Class: DCloud::HardwareProfile::Property::Range

Inherits:
Object
  • Object
show all
Defined in:
lib/dcloud/hardware_profile.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#firstObject (readonly)

Returns the value of attribute first.



26
27
28
# File 'lib/dcloud/hardware_profile.rb', line 26

def first
  @first
end

#lastObject (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

Returns:

  • (Boolean)


33
34
35
# File 'lib/dcloud/hardware_profile.rb', line 33

def present?
  ! @first.nil?
end