Sha256: e1b9a49563a9971a1d527599c7afa01184b3908cc1fe716dcee2777b31562e68

Contents?: true

Size: 849 Bytes

Versions: 14

Compression:

Stored size: 849 Bytes

Contents

module Fog
  module Parsers
    module Terremark
      module Shared
        class GetOrganizations < TerremarkParser
          # include Fog::Terremark::Shared::Parser

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

          def start_element(name, attributes)
            super
            if name == 'Org'
              organization = extract_attributes(attributes)
              until attributes.empty?
                if attributes.first.is_a?(Array)
                  attribute = attributes.shift
                  organization[attribute.first] = attribute.last
                else
                  organization[attributes.shift] = attributes.shift
                end
              end
              @response['OrgList'] << organization
            end
          end
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 4 rubygems

Version Path
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/lib/fog/terremark/parsers/shared/get_organizations.rb
nsidc-fog-1.24.1 lib/fog/terremark/parsers/shared/get_organizations.rb
fog-1.24.0 lib/fog/terremark/parsers/shared/get_organizations.rb
ns-fog-1.22.11 lib/fog/terremark/parsers/shared/get_organizations.rb
ns-fog-1.22.10 lib/fog/terremark/parsers/shared/get_organizations.rb
ns-fog-1.22.9 lib/fog/terremark/parsers/shared/get_organizations.rb
ns-fog-1.22.8 lib/fog/terremark/parsers/shared/get_organizations.rb
ns-fog-1.22.7 lib/fog/terremark/parsers/shared/get_organizations.rb
ns-fog-1.22.6 lib/fog/terremark/parsers/shared/get_organizations.rb
fog-1.23.0 lib/fog/terremark/parsers/shared/get_organizations.rb
ns-fog-1.22.4 lib/fog/terremark/parsers/shared/get_organizations.rb
ns-fog-1.22.3 lib/fog/terremark/parsers/shared/get_organizations.rb
ns-fog-1.22.2 lib/fog/terremark/parsers/shared/get_organizations.rb
fog-1.22.1 lib/fog/terremark/parsers/shared/get_organizations.rb