Class: DCloud::HardwareProfile::Property::Range
- Inherits:
-
Object
- Object
- DCloud::HardwareProfile::Property::Range
- Defined in:
- lib/dcloud/hardware_profile.rb
Instance Attribute Summary collapse
-
#first ⇒ Object
readonly
Returns the value of attribute first.
-
#last ⇒ Object
readonly
Returns the value of attribute last.
Instance Method Summary collapse
-
#initialize(element) ⇒ Range
constructor
A new instance of Range.
- #present? ⇒ Boolean
Constructor Details
#initialize(element) ⇒ Range
Returns a new instance of Range.
27 28 29 30 31 32 |
# File 'lib/dcloud/hardware_profile.rb', line 27 def initialize(element) if element @first = element.attributes['first'] @last = element.attributes['last'] end end |
Instance Attribute Details
#first ⇒ Object (readonly)
Returns the value of attribute first.
26 27 28 |
# File 'lib/dcloud/hardware_profile.rb', line 26 def first @first end |
#last ⇒ Object (readonly)
Returns the value of attribute last.
26 27 28 |
# File 'lib/dcloud/hardware_profile.rb', line 26 def last @last end |
Instance Method Details
#present? ⇒ Boolean
33 34 35 |
# File 'lib/dcloud/hardware_profile.rb', line 33 def present? ! @first.nil? end |