Sha256: ae66d8489afc971c3c03f39eafa539d6542e94525086ca67f462c69e5e2f6c5c

Contents?: true

Size: 831 Bytes

Versions: 9

Compression:

Stored size: 831 Bytes

Contents

module Fog
  module Parsers
    module TerremarkEcloud
      module Compute

        class GetOrganization < Fog::Parsers::Base

          def reset
            @response = { 'Link' => [] }
          end

          def start_element(name, attrs = [])
            case name
            when 'Link'
              link = {}
              for attribute in %w{href name rel type}
                if value = attr_value(attribute, attrs)
                  link[attribute] = value
                end
              end
              @response['Link'] << link
            when 'Org'
              for attribute in %w{href name}
                if value = attr_value(attribute, attrs)
                  @response[attribute] = value
                end
              end
            end
          end

        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
fog-0.5.3 lib/fog/compute/parsers/terremark_ecloud/get_organization.rb
fog-0.5.2 lib/fog/compute/parsers/terremark_ecloud/get_organization.rb
fog-0.5.1 lib/fog/compute/parsers/terremark_ecloud/get_organization.rb
fog-0.5.0 lib/fog/compute/parsers/terremark_ecloud/get_organization.rb
phpfog-fog-0.4.1.3 lib/fog/compute/parsers/terremark_ecloud/get_organization.rb
phpfog-fog-0.4.1.2 lib/fog/compute/parsers/terremark_ecloud/get_organization.rb
phpfog-fog-0.4.1.1 lib/fog/compute/parsers/terremark_ecloud/get_organization.rb
phpfog-fog-0.4.1 lib/fog/compute/parsers/terremark_ecloud/get_organization.rb
fog-0.4.1 lib/fog/compute/parsers/terremark_ecloud/get_organization.rb