Class: Tins::MethodDescription::Signature

Inherits:
Object
  • Object
show all
Defined in:
lib/tins/method_description.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*parameters) ⇒ Signature

Returns a new instance of Signature.



75
76
77
# File 'lib/tins/method_description.rb', line 75

def initialize(*parameters)
  @parameters = parameters
end

Instance Attribute Details

#parametersObject (readonly)

Returns the value of attribute parameters.



79
80
81
# File 'lib/tins/method_description.rb', line 79

def parameters
  @parameters
end

Instance Method Details

#==(other) ⇒ Object



85
86
87
# File 'lib/tins/method_description.rb', line 85

def ==(other)
  @parameters == other.parameters
end

#===(method) ⇒ Object



89
90
91
# File 'lib/tins/method_description.rb', line 89

def ===(method)
  self == method.signature
end

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


81
82
83
# File 'lib/tins/method_description.rb', line 81

def eql?(other)
  @parameters.eql? other.parameters
end

#inspectObject



97
98
99
# File 'lib/tins/method_description.rb', line 97

def inspect
  "#<#{self.class} (#{to_s})>"
end

#to_sObject



93
94
95
# File 'lib/tins/method_description.rb', line 93

def to_s
  @parameters * ?,
end