Class: Interface::Argument
- Inherits:
-
Object
- Object
- Interface::Argument
- Defined in:
- lib/interface/interface.rb
Instance Attribute Summary collapse
-
#desc ⇒ Object
Returns the value of attribute desc.
-
#key ⇒ Object
Returns the value of attribute key.
-
#type ⇒ Object
Returns the value of attribute type.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(params) ⇒ Argument
constructor
A new instance of Argument.
Constructor Details
#initialize(params) ⇒ Argument
Returns a new instance of Argument.
23 24 25 26 27 |
# File 'lib/interface/interface.rb', line 23 def initialize(params) params.each do |key, value| instance_variable_set("@#{key}", value) end end |
Instance Attribute Details
#desc ⇒ Object
Returns the value of attribute desc.
21 22 23 |
# File 'lib/interface/interface.rb', line 21 def desc @desc end |
#key ⇒ Object
Returns the value of attribute key.
21 22 23 |
# File 'lib/interface/interface.rb', line 21 def key @key end |
#type ⇒ Object
Returns the value of attribute type.
21 22 23 |
# File 'lib/interface/interface.rb', line 21 def type @type end |
#value ⇒ Object
Returns the value of attribute value.
21 22 23 |
# File 'lib/interface/interface.rb', line 21 def value @value end |