Class: Fog::Joyent::Analytics::JoyentModules

Inherits:
Collection
  • Object
show all
Defined in:
lib/fog/joyent/models/analytics/joyent_modules.rb

Instance Method Summary collapse

Instance Method Details

#allObject



9
10
11
12
# File 'lib/fog/joyent/models/analytics/joyent_modules.rb', line 9

def all
  data = service.describe_analytics.body['modules']
  load(data)
end

#new(attributes = {}) ⇒ Object

Joyent returns an odd data structure like this: { ‘apache’ => => ‘Apache’} where the key is the name of the module



17
18
19
20
# File 'lib/fog/joyent/models/analytics/joyent_modules.rb', line 17

def new(attributes = {})
  name, other_attributes = attributes
  super(other_attributes.merge('name' => name))
end