class Yao::Resources::Flavor

Public Class Methods

find_by_name(name, query={}) click to toggle source

override Yao::Resources::RestfullyAccessible#find_by_name @return [Array<Yao::Resources::Role>]

# File lib/yao/resources/flavor.rb, line 27
def find_by_name(name, query={})
  list(query).select do |flavor|
    flavor.name == name
  end
end

Public Instance Methods

memory(unit='M')
Alias for: ram
ram(unit='M') click to toggle source

@param unit [String] @return [Integer]

# File lib/yao/resources/flavor.rb, line 9
def ram(unit='M')
  case unit
  when 'M'
    self["ram"]
  when 'G'
    self["ram"] / 1024.0
  end
end
Also aliased as: memory