Class: Lino::Model::Argument
- Inherits:
-
Object
- Object
- Lino::Model::Argument
- Defined in:
- lib/lino/model/argument.rb
Instance Attribute Summary collapse
-
#argument ⇒ Object
readonly
Returns the value of attribute argument.
Instance Method Summary collapse
- #==(other) ⇒ Object (also: #eql?)
- #array ⇒ Object
- #hash ⇒ Object
-
#initialize(argument) ⇒ Argument
constructor
A new instance of Argument.
- #string ⇒ Object (also: #to_s, #to_a)
Constructor Details
#initialize(argument) ⇒ Argument
Returns a new instance of Argument.
8 9 10 |
# File 'lib/lino/model/argument.rb', line 8 def initialize(argument) @argument = argument end |
Instance Attribute Details
#argument ⇒ Object (readonly)
Returns the value of attribute argument.
6 7 8 |
# File 'lib/lino/model/argument.rb', line 6 def argument @argument end |
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
22 23 24 25 |
# File 'lib/lino/model/argument.rb', line 22 def ==(other) self.class == other.class && state == other.state end |
#array ⇒ Object
17 18 19 |
# File 'lib/lino/model/argument.rb', line 17 def array [argument.to_s] end |
#hash ⇒ Object
28 29 30 |
# File 'lib/lino/model/argument.rb', line 28 def hash [self.class, state].hash end |
#string ⇒ Object Also known as: to_s, to_a
12 13 14 |
# File 'lib/lino/model/argument.rb', line 12 def string argument.to_s end |