Class: Ashiba::TemplateVariable
- Inherits:
-
Object
- Object
- Ashiba::TemplateVariable
- Defined in:
- lib/ashiba/cli.rb
Instance Attribute Summary collapse
-
#default ⇒ Object
Returns the value of attribute default.
-
#mandatory ⇒ Object
Returns the value of attribute mandatory.
-
#name ⇒ Object
Returns the value of attribute name.
-
#type ⇒ Object
Returns the value of attribute type.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(name = '', value = '', type = 'String', default = '', mandatory = false) ⇒ TemplateVariable
constructor
ok this is bugged.
- #to_s ⇒ Object
Constructor Details
#initialize(name = '', value = '', type = 'String', default = '', mandatory = false) ⇒ TemplateVariable
ok this is bugged
11 12 13 14 15 16 17 |
# File 'lib/ashiba/cli.rb', line 11 def initialize(name = '', value = '', type = 'String', default = '', mandatory = false) @name = name @value = value @type = type @default = default @mandatory = mandatory end |
Instance Attribute Details
#default ⇒ Object
Returns the value of attribute default.
8 9 10 |
# File 'lib/ashiba/cli.rb', line 8 def default @default end |
#mandatory ⇒ Object
Returns the value of attribute mandatory.
8 9 10 |
# File 'lib/ashiba/cli.rb', line 8 def mandatory @mandatory end |
#name ⇒ Object
Returns the value of attribute name.
8 9 10 |
# File 'lib/ashiba/cli.rb', line 8 def name @name end |
#type ⇒ Object
Returns the value of attribute type.
8 9 10 |
# File 'lib/ashiba/cli.rb', line 8 def type @type end |
#value ⇒ Object
Returns the value of attribute value.
8 9 10 |
# File 'lib/ashiba/cli.rb', line 8 def value @value end |
Instance Method Details
#to_s ⇒ Object
19 20 21 |
# File 'lib/ashiba/cli.rb', line 19 def to_s "#{name}=#{value} of type #{type}, defaulting to #{default} and mandatory is #{mandatory}" end |