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
512 513 514 515 516 |
# File 'lib/deltacloud.rb', line 512 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
510 511 512 |
# File 'lib/deltacloud.rb', line 510 def kind @kind end |
- (Object) name (readonly)
Returns the value of attribute name
510 511 512 |
# File 'lib/deltacloud.rb', line 510 def name @name end |
- (Object) unit (readonly)
Returns the value of attribute unit
510 511 512 |
# File 'lib/deltacloud.rb', line 510 def unit @unit end |
- (Object) value (readonly)
Returns the value of attribute value
510 511 512 |
# File 'lib/deltacloud.rb', line 510 def value @value end |
Instance Method Details
- (Boolean) present?
518 519 520 |
# File 'lib/deltacloud.rb', line 518 def present? ! @value.nil? end |