module Cloudcost::Pricing

Public Class Methods

server_costs_per_day(flavor) click to toggle source
# File lib/cloudcost/pricing.rb, line 12
def self.server_costs_per_day(flavor)
  PRICING["servers"][flavor] || raise(PricingError, "#{flavor} flavor not found in pricing.yml")
end
storage_costs_per_day(type, size_in_gb) click to toggle source
# File lib/cloudcost/pricing.rb, line 16
def self.storage_costs_per_day(type, size_in_gb)
  raise PricingError, "#{type} storage type not found in pricing.yml" unless PRICING["storage"][type]

  PRICING["storage"][type] * size_in_gb
end