Class: TestKitchen::Platform::Version
- Inherits:
-
Object
- Object
- TestKitchen::Platform::Version
- Includes:
- Chef::Mixin::ParamsValidate
- Defined in:
- lib/test-kitchen/platform.rb
Instance Attribute Summary collapse
- #box(arg = nil) ⇒ Object
- #box_url(arg = nil) ⇒ Object
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, &block) ⇒ Version
constructor
A new instance of Version.
Constructor Details
#initialize(name, &block) ⇒ Version
Returns a new instance of Version.
46 47 48 49 50 |
# File 'lib/test-kitchen/platform.rb', line 46 def initialize(name, &block) raise ArgumentError, "Version name must be specified" if name.nil? || name.empty? @name = name instance_eval(&block) if block_given? end |
Instance Attribute Details
#box(arg = nil) ⇒ Object
52 53 54 |
# File 'lib/test-kitchen/platform.rb', line 52 def box(arg=nil) set_or_return(:box, arg, {}) end |
#box_url(arg = nil) ⇒ Object
56 57 58 |
# File 'lib/test-kitchen/platform.rb', line 56 def box_url(arg=nil) set_or_return(:box_url, arg, {}) end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
43 44 45 |
# File 'lib/test-kitchen/platform.rb', line 43 def name @name end |