Sha256: 13401c354fbfe70ddb79842c1c984ed5028d5d3b44dc6798601494792fc67229

Contents?: true

Size: 774 Bytes

Versions: 16

Compression:

Stored size: 774 Bytes

Contents

unless Fog.mocking?

  module Fog
    class Slicehost

      # Get list of flavors
      #
      # ==== Returns
      # * response<~Excon::Response>:
      #   * body<~Array>:
      #     * 'id'<~Integer> - Id of the flavor
      #     * 'name'<~String> - Name of the flavor
      #     * 'price'<~Integer> - Price in cents
      #     * 'ram'<~Integer> - Amount of ram for the flavor
      def get_flavors
        request(
          :expects  => 200,
          :method   => 'GET',
          :parser   => Fog::Parsers::Slicehost::GetFlavors.new,
          :path     => 'flavors.xml'
        )
      end

    end
  end

else

  module Fog
    class Slicehost

      def get_flavors
        raise MockNotImplemented.new("Contributions welcome!")
      end

    end
  end

end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
fog-0.0.58 lib/fog/slicehost/requests/get_flavors.rb
fog-0.0.57 lib/fog/slicehost/requests/get_flavors.rb
fog-0.0.56 lib/fog/slicehost/requests/get_flavors.rb
fog-0.0.55 lib/fog/slicehost/requests/get_flavors.rb
fog-0.0.54 lib/fog/slicehost/requests/get_flavors.rb
fog-0.0.53 lib/fog/slicehost/requests/get_flavors.rb
fog-0.0.52 lib/fog/slicehost/requests/get_flavors.rb
fog-0.0.51 lib/fog/slicehost/requests/get_flavors.rb
fog-0.0.50 lib/fog/slicehost/requests/get_flavors.rb
fog-0.0.49 lib/fog/slicehost/requests/get_flavors.rb
fog-0.0.48 lib/fog/slicehost/requests/get_flavors.rb
fog-0.0.47 lib/fog/slicehost/requests/get_flavors.rb
fog-0.0.46 lib/fog/slicehost/requests/get_flavors.rb
fog-0.0.45 lib/fog/slicehost/requests/get_flavors.rb
fog-0.0.44 lib/fog/slicehost/requests/get_flavors.rb
fog-0.0.43 lib/fog/slicehost/requests/get_flavors.rb