Class: RHC::Rest::GearGroup

Inherits:
Base show all
Defined in:
lib/rhc/rest/gear_group.rb

Direct Known Subclasses

Mock::MockRestGearGroup

Instance Method Summary collapse

Methods inherited from Base

#add_message, #has_param?, #initialize, #link_href, #links, #rest_method, #supports?

Methods included from AttributesClass

#define_attr, #model_name

Methods included from Attributes

#attribute, #attributes, #attributes=, #clear_attribute

Constructor Details

This class inherits a constructor from RHC::Rest::Base

Instance Method Details

#name(gear) ⇒ Object



6
7
8
# File 'lib/rhc/rest/gear_group.rb', line 6

def name(gear)
  gear['name'] ||= "#{group.cartridges.collect{ |c| c['name'] }.join('+')}:#{gear['id']}"
end

#quotaObject



10
11
12
13
# File 'lib/rhc/rest/gear_group.rb', line 10

def quota
  return nil unless base_gear_storage
  ((additional_gear_storage || 0) + base_gear_storage) * 1024 * 1024 * 1024
end