Sha256: 34c9596ee5921c33c288e8c9458994c0e06fdb8afa11afc685239cef71c387c6

Contents?: true

Size: 873 Bytes

Versions: 12

Compression:

Stored size: 873 Bytes

Contents

module Fog
  module Parsers
    module Vcloud
      class Base < Fog::Parsers::Base

        private

        def generate_link(attributes)
          link = Struct::VcloudLink.new
          until attributes.empty?
            link[attributes.shift.downcase] = attributes.shift
          end
          link
        end

        def handle_root(attributes)
          root = {}
          until attributes.empty?
            if attributes.first.is_a?(Array)
              attribute = attributes.shift
              root[attribute.first.downcase] = attribute.last
            else
              root[attributes.shift.downcase] = attributes.shift
            end
          end
          @response.href = root['href']
          @response.name = root['name']
          @response.type = root['type']
          @response.xmlns = root['xmlns']
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
fog-0.1.4 lib/fog/vcloud/parser.rb
fog-0.1.3 lib/fog/vcloud/parser.rb
fog-0.1.2 lib/fog/vcloud/parser.rb
fog-0.1.1 lib/fog/vcloud/parser.rb
fog-0.1.0 lib/fog/vcloud/parser.rb
fog-0.0.100 lib/fog/vcloud/parser.rb
fog-0.0.99 lib/fog/vcloud/parser.rb
fog-0.0.98 lib/fog/vcloud/parser.rb
fog-0.0.97 lib/fog/vcloud/parser.rb
fog-0.0.96 lib/fog/vcloud/parser.rb
fog-0.0.95 lib/fog/vcloud/parser.rb
fog-0.0.94 lib/fog/vcloud/parser.rb