Class: Rumx::Argument
- Inherits:
-
Object
- Object
- Rumx::Argument
- Defined in:
- lib/rumx/argument.rb
Instance Attribute Summary collapse
-
#default_value ⇒ Object
readonly
Returns the value of attribute default_value.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(name, type_name, description, default_value = nil) ⇒ Argument
constructor
A new instance of Argument.
Constructor Details
#initialize(name, type_name, description, default_value = nil) ⇒ Argument
Returns a new instance of Argument.
5 6 7 8 9 10 |
# File 'lib/rumx/argument.rb', line 5 def initialize(name, type_name, description, default_value=nil) @name = name.to_sym @type = Type.find(type_name) @description = description @default_value = default_value end |
Instance Attribute Details
#default_value ⇒ Object (readonly)
Returns the value of attribute default_value.
3 4 5 |
# File 'lib/rumx/argument.rb', line 3 def default_value @default_value end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
3 4 5 |
# File 'lib/rumx/argument.rb', line 3 def description @description end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/rumx/argument.rb', line 3 def name @name end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
3 4 5 |
# File 'lib/rumx/argument.rb', line 3 def type @type end |