Class/Module Index [+]

Quicksearch

Fog::Parsers::Compute::Voxel::VoxcloudStatus

Public Instance Methods

end_element(name) click to toggle source
# File lib/fog/voxel/parsers/compute/voxcloud_status.rb, line 27
def end_element(name)
  case name
  when 'device'
    @response['devices'] << @device
    @device = {}
  when 'id', 'status'
    @device[name] = value
  when 'last_update'
    @device[name] = Time.at(value.to_i)
  end
end
reset() click to toggle source
# File lib/fog/voxel/parsers/compute/voxcloud_status.rb, line 6
def reset
  @response = { 'devices' => [] }
  @device = {}
end
start_element(name, attrs = []) click to toggle source
# File lib/fog/voxel/parsers/compute/voxcloud_status.rb, line 11
def start_element(name, attrs = [])
  super

  case name
  when 'rsp'
    @response['stat'] = attr_value('stat', attrs)
  when 'err'
    @response['err'] = {
      'code'  => attr_value('code', attrs),
      'msg'   => attr_value('msg', attrs)
    }
  when 'device'
    @device = {}
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.