class Xumlidot::Types::MethodSignature
Value object for a method
we store all the method details here including many which we are not yet using.
Attributes
args[RW]
file[RW]
line_max[RW]
line_number[RW]
name[RW]
superclass_method[RW]
visibility[RW]
Public Class Methods
new()
click to toggle source
# File lib/xumlidot/types/method_signature.rb, line 27 def initialize @superclass_method = false end
Public Instance Methods
to_s()
click to toggle source
# File lib/xumlidot/types/method_signature.rb, line 31 def to_s "#{klass} #{visibility_symbol} #{clean_name}(#{@args})" end
Private Instance Methods
clean_name()
click to toggle source
# File lib/xumlidot/types/method_signature.rb, line 37 def clean_name tmp = @name.is_a?(Regexp) ? @name.inspect : @name.to_s case tmp when '<<' '<<' else tmp end end
klass()
click to toggle source
# File lib/xumlidot/types/method_signature.rb, line 59 def klass @superclass_method ? 'S' : 'I' end
visibility_symbol()
click to toggle source
# File lib/xumlidot/types/method_signature.rb, line 48 def visibility_symbol case @visibility when :public '+' when :private '-' when :protected '#' end end