Sha256: 820c96810f02864f46cb1f2dcd0628dbdb5b6c77d99b4e0548fec81116aac2c6

Contents?: true

Size: 703 Bytes

Versions: 84

Compression:

Stored size: 703 Bytes

Contents

require 'fog/model'

module Fog
  module Slicehost

    class Flavor < Fog::Model

      identity :id

      attribute :name
      attribute :price
      attribute :ram

      def bits
        # 64
        raise StandardError.new("Figure me out!?!")
      end

      def cores
        # # 2 quad-cores >= 2Ghz = 8 cores
        # 8 * case ram
        # when 256
        #   1/64.0
        # when 512
        #   1/32.0
        # when 1024
        #   1/16.0
        # when 2048
        #   1/8.0
        # when 4096
        #   1/4.0
        # when 8192
        #   1/2.0
        # when 15872
        #   1
        # end
        raise StandardError.new("Figure me out!?!")
      end

    end

  end
end

Version data entries

84 entries across 84 versions & 2 rubygems

Version Path
fog-0.2.30 lib/fog/slicehost/models/flavor.rb
fog-0.2.28 lib/fog/slicehost/models/flavor.rb
fog-0.2.27 lib/fog/slicehost/models/flavor.rb
fog-0.2.26 lib/fog/slicehost/models/flavor.rb
fog-0.2.25 lib/fog/slicehost/models/flavor.rb
fog-0.2.24 lib/fog/slicehost/models/flavor.rb
tecnh-fog-0.2.23.vpc lib/fog/slicehost/models/flavor.rb
fog-0.2.23 lib/fog/slicehost/models/flavor.rb
fog-0.2.22 lib/fog/slicehost/models/flavor.rb
fog-0.2.21 lib/fog/slicehost/models/flavor.rb
fog-0.2.20 lib/fog/slicehost/models/flavor.rb
fog-0.2.19 lib/fog/slicehost/models/flavor.rb
fog-0.2.18 lib/fog/slicehost/models/flavor.rb
fog-0.2.17 lib/fog/slicehost/models/flavor.rb
fog-0.2.16 lib/fog/slicehost/models/flavor.rb
fog-0.2.15 lib/fog/slicehost/models/flavor.rb
fog-0.2.14 lib/fog/slicehost/models/flavor.rb
fog-0.2.13 lib/fog/slicehost/models/flavor.rb
fog-0.2.12 lib/fog/slicehost/models/flavor.rb
fog-0.2.11 lib/fog/slicehost/models/flavor.rb