Class: DeltaCloud::HWP::Property
- Inherits:
-
Object
- Object
- DeltaCloud::HWP::Property
- Defined in:
- lib/deltacloud.rb
Direct Known Subclasses
Instance Attribute Summary (collapse)
-
- (Object) kind
readonly
Returns the value of attribute kind.
-
- (Object) name
readonly
Returns the value of attribute name.
-
- (Object) unit
readonly
Returns the value of attribute unit.
-
- (Object) value
readonly
Returns the value of attribute value.
Instance Method Summary (collapse)
-
- (Property) initialize(xml, name)
constructor
A new instance of Property.
- - (Boolean) present?
Constructor Details
- (Property) initialize(xml, name)
A new instance of Property
448 449 450 451 452 |
# File 'lib/deltacloud.rb', line 448 def initialize(xml, name) @name, @kind, @value, @unit = xml['name'], xml['kind'].to_sym, xml['value'], xml['unit'] declare_ranges(xml) self end |
Instance Attribute Details
- (Object) kind (readonly)
Returns the value of attribute kind
446 447 448 |
# File 'lib/deltacloud.rb', line 446 def kind @kind end |
- (Object) name (readonly)
Returns the value of attribute name
446 447 448 |
# File 'lib/deltacloud.rb', line 446 def name @name end |
- (Object) unit (readonly)
Returns the value of attribute unit
446 447 448 |
# File 'lib/deltacloud.rb', line 446 def unit @unit end |
- (Object) value (readonly)
Returns the value of attribute value
446 447 448 |
# File 'lib/deltacloud.rb', line 446 def value @value end |
Instance Method Details
- (Boolean) present?
454 455 456 |
# File 'lib/deltacloud.rb', line 454 def present? ! @value.nil? end |