Sha256: 3b262f41057b3c6c904f1546606de855117a05e7a992d23c57a332f91d4cd901

Contents?: true

Size: 783 Bytes

Versions: 29

Compression:

Stored size: 783 Bytes

Contents

module Fog
  class Vcloud < Fog::Service
    class Collection < Fog::Collection

      def load(objects)
        objects = [ objects ] if objects.is_a?(Hash)
        super
      end

      def check_href!(opts = {})
        unless href
          if opts.is_a?(String)
            t = Hash.new
            t[:parent] = opts
            opts = t
          end
          msg = ":href missing, call with a :href pointing to #{if opts[:message]
                  opts[:message]
                elsif opts[:parent]
                  "the #{opts[:parent]} whos #{self.class.to_s.split('::').last.downcase} you want to enumerate"
                else
                  "the resource"
                end}"
          raise Fog::Errors::Error.new(msg)
        end
      end

    end
  end
end

Version data entries

29 entries across 29 versions & 3 rubygems

Version Path
fog-0.5.3 lib/fog/vcloud/collection.rb
fog-0.5.2 lib/fog/vcloud/collection.rb
fog-0.5.1 lib/fog/vcloud/collection.rb
fog-0.5.0 lib/fog/vcloud/collection.rb
phpfog-fog-0.4.1.3 lib/fog/vcloud/collection.rb
phpfog-fog-0.4.1.2 lib/fog/vcloud/collection.rb
phpfog-fog-0.4.1.1 lib/fog/vcloud/collection.rb
phpfog-fog-0.4.1 lib/fog/vcloud/collection.rb
fog-0.4.1 lib/fog/vcloud/collection.rb
fog-0.4.0 lib/fog/vcloud/collection.rb
fog-0.3.34 lib/fog/vcloud/collection.rb
fog-0.3.33 lib/fog/vcloud/collection.rb
fog-0.3.32 lib/fog/vcloud/collection.rb
fog-0.3.31 lib/fog/vcloud/collection.rb
fog-0.3.30 lib/fog/vcloud/collection.rb
fog-0.3.29 lib/fog/vcloud/collection.rb
fog-0.3.28 lib/fog/vcloud/collection.rb
fog-0.3.27 lib/fog/vcloud/collection.rb
fog-0.3.26 lib/fog/vcloud/collection.rb
fog-0.3.25 lib/fog/vcloud/collection.rb