Class: Cocoadex::Parameter
- Inherits:
-
Object
- Object
- Cocoadex::Parameter
- Includes:
- Comparable
- Defined in:
- lib/cocoadex/models/parameter.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #<=>(other) ⇒ Object
-
#initialize(name, description) ⇒ Parameter
constructor
A new instance of Parameter.
- #to_s ⇒ Object
Constructor Details
#initialize(name, description) ⇒ Parameter
Returns a new instance of Parameter.
8 9 10 |
# File 'lib/cocoadex/models/parameter.rb', line 8 def initialize name, description @name, @description = name, description end |
Instance Attribute Details
#description ⇒ Object (readonly)
Returns the value of attribute description.
6 7 8 |
# File 'lib/cocoadex/models/parameter.rb', line 6 def description @description end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/cocoadex/models/parameter.rb', line 6 def name @name end |
Instance Method Details
#<=>(other) ⇒ Object
16 17 18 |
# File 'lib/cocoadex/models/parameter.rb', line 16 def <=> other name <=> other.name if other.respond_to? :name end |
#to_s ⇒ Object
12 13 14 |
# File 'lib/cocoadex/models/parameter.rb', line 12 def to_s "#{name} - #{description}" end |