mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00

Done with `rubocop --auto-correct --only EmptyLineBetweenDefs,EmptyLines,EmptyLinesAroundBody`
24 lines
613 B
Ruby
24 lines
613 B
Ruby
require 'fog/joyent/models/analytics/field'
|
|
|
|
module Fog
|
|
module Joyent
|
|
class Analytics
|
|
class Fields < Fog::Collection
|
|
model Fog::Joyent::Analytics::Field
|
|
|
|
def all
|
|
data = service.describe_analytics.body['fields']
|
|
load(data)
|
|
end
|
|
|
|
# Joyent returns an odd data structure like this:
|
|
# { 'apache' => {'label' => 'Apache'}}
|
|
# where the key is the name of the module
|
|
def new(attributes = {})
|
|
name, other_attributes = attributes
|
|
super(other_attributes.merge('name' => name))
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|