Class: DeltacloudVM::Client::Helpers::Property::Property
- Inherits:
-
Object
- Object
- DeltacloudVM::Client::Helpers::Property::Property
- Defined in:
- lib/deltacloud_vm/client/helpers/property_helper.rb
Instance Attribute Summary collapse
-
#default ⇒ Object
readonly
Returns the value of attribute default.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#unit ⇒ Object
readonly
Returns the value of attribute unit.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name, unit, default = nil) ⇒ Property
constructor
A new instance of Property.
- #kind ⇒ Object
- #value ⇒ Object
Constructor Details
#initialize(name, unit, default = nil) ⇒ Property
Returns a new instance of Property.
23 24 25 26 27 |
# File 'lib/deltacloud_vm/client/helpers/property_helper.rb', line 23 def initialize(name, unit, default=nil) @name = name @unit = unit @default = default end |
Instance Attribute Details
#default ⇒ Object (readonly)
Returns the value of attribute default.
21 22 23 |
# File 'lib/deltacloud_vm/client/helpers/property_helper.rb', line 21 def default @default end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
21 22 23 |
# File 'lib/deltacloud_vm/client/helpers/property_helper.rb', line 21 def name @name end |
#unit ⇒ Object (readonly)
Returns the value of attribute unit.
21 22 23 |
# File 'lib/deltacloud_vm/client/helpers/property_helper.rb', line 21 def unit @unit end |
Class Method Details
Instance Method Details
#kind ⇒ Object
37 38 39 |
# File 'lib/deltacloud_vm/client/helpers/property_helper.rb', line 37 def kind self.class.name.split('::').last.downcase.to_sym end |
#value ⇒ Object
29 30 31 |
# File 'lib/deltacloud_vm/client/helpers/property_helper.rb', line 29 def value @default || 'opaque' end |