Sha256: 527a124dd45c1de18f8205501ea4f2637e07f68ce00d7819017e833537fced02
Contents?: true
Size: 652 Bytes
Versions: 6
Compression:
Stored size: 652 Bytes
Contents
module Brightbox class Account < Api def ram_free [ram_limit.to_i - ram_used.to_i, 0].max end def to_row attributes.merge({ :ram_free => ram_free, :cloud_ip_limit => limits_cloudips }) end def self.all a = conn.account a.connection = conn [a] end def self.get(id) a = conn.account a.connection = conn if a.id == id a else nil end end def self.default_field_order [:id, :name, :cloud_ip_limit, :ram_limit, :ram_used, :ram_free] end def to_s @id end end end
Version data entries
6 entries across 6 versions & 1 rubygems