Class: Tins::MethodDescription::Parameters::Parameter
- Defined in:
- lib/tins/method_description.rb
Overview
Base class for all parameter types.
Direct Known Subclasses
BlockParameter, GenericParameter, KeyParameter, KeyreqParameter, KeyrestParameter, OptParameter, ReqParameter, RestParameter
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#==(other) ⇒ Boolean
Compares two parameters by their type.
-
#inspect ⇒ String
Returns a string representation of the parameter for debugging.
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name
11 12 13 |
# File 'lib/tins/method_description.rb', line 11 def name @name end |
#type ⇒ Object
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 |
#inspect ⇒ String
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 |