Class: Ashiba::TemplateVariable

Inherits:
Object
  • Object
show all
Defined in:
lib/ashiba/cli.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#defaultObject

Returns the value of attribute default.



8
9
10
# File 'lib/ashiba/cli.rb', line 8

def default
  @default
end

#mandatoryObject

Returns the value of attribute mandatory.



8
9
10
# File 'lib/ashiba/cli.rb', line 8

def mandatory
  @mandatory
end

#nameObject

Returns the value of attribute name.



8
9
10
# File 'lib/ashiba/cli.rb', line 8

def name
  @name
end

#typeObject

Returns the value of attribute type.



8
9
10
# File 'lib/ashiba/cli.rb', line 8

def type
  @type
end

#valueObject

Returns the value of attribute value.



8
9
10
# File 'lib/ashiba/cli.rb', line 8

def value
  @value
end

Instance Method Details

#to_sObject



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