Class: Fog::Joyent::Analytics::Types

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

Instance Method Summary collapse

Instance Method Details

#allObject



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

def all
  data = service.describe_analytics.body['types']
  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/types.rb', line 17

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