class Fog::Parsers::AWS::Compute::DescribeClassicLinkInstances

Public Instance Methods

end_element(name) click to toggle source
# File lib/fog/aws/parsers/compute/describe_classic_link_instances.rb, line 23
def end_element(name)
  if @in_tag_set
    case name
    when 'item'
      @instance['tagSet'][@tag['key']] = @tag['value']
      @tag = {}
    when 'key', 'value'
      @tag[name] = value
    when 'tagSet'
      @in_tag_set = false
    end
  elsif @in_group_set
    case name
    when 'item'
      @instance['groups'] << @group
      @group = {}
    when 'groupId', 'groupName'
      @group[name] = value
    when 'groupSet'
      @in_group_set = false
    end
  else
    case name
    when 'vpcId', 'instanceId'
      @instance[name] = value
    when 'item'
      @response['instancesSet'] << @instance
      @instance = { 'tagSet' => {}, 'groups' => [] }
    when 'requestId', 'nextToken'
      @response[name] = value
    end
  end
end
reset() click to toggle source
# File lib/fog/aws/parsers/compute/describe_classic_link_instances.rb, line 6
def reset
  @instance = { 'tagSet' => {}, 'groups' => [] }
  @response = { 'instancesSet' => [] }
  @tag = {}
  @group = {}
end
start_element(name, attrs = []) click to toggle source
Calls superclass method
# File lib/fog/aws/parsers/compute/describe_classic_link_instances.rb, line 13
def start_element(name, attrs = [])
  super
  case name
  when 'groupSet'
    @in_group_set = true
  when 'tagSet'
    @in_tag_set = true
  end
end