Class: Tins::MethodDescription::Parameters::Parameter

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

Overview

Base class for all parameter types.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#nameObject

Returns the value of attribute name



11
12
13
# File 'lib/tins/method_description.rb', line 11

def name
  @name
end

#typeObject

Returns the value of attribute type



11
12
13
# File 'lib/tins/method_description.rb', line 11

def type
  @type
end

Instance Method Details

#==(other) ⇒ Boolean

Compares two parameters by their type.



16
17
18
# File 'lib/tins/method_description.rb', line 16

def ==(other)
  type == other.type
end

#inspectString

Returns a string representation of the parameter for debugging.



23
24
25
# File 'lib/tins/method_description.rb', line 23

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