Class: Garb::Management::Account

Inherits:
Object
  • Object
show all
Extended by:
Attributes
Includes:
PathAttribute
Defined in:
lib/garb/management/account.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Attributes

extended

Methods included from PathAttribute

#path

Constructor Details

#initialize(entry, session) ⇒ Account

Returns a new instance of Account.



10
11
12
13
# File 'lib/garb/management/account.rb', line 10

def initialize(entry, session)
  @entry = entry
  @session = session
end

Instance Attribute Details

#sessionObject (readonly)

Returns the value of attribute session.



7
8
9
# File 'lib/garb/management/account.rb', line 7

def session
  @session
end

Class Method Details

.all(session = Session) ⇒ Object



15
16
17
18
# File 'lib/garb/management/account.rb', line 15

def self.all(session = Session)
  feed = Feed.new(session, '/accounts')
  feed.entries.map { |entry| new(entry, session) }
end

Instance Method Details

#goalsObject



28
29
30
# File 'lib/garb/management/account.rb', line 28

def goals
  @goals ||= Goal.(self)
end

#profilesObject



24
25
26
# File 'lib/garb/management/account.rb', line 24

def profiles
  @profiles ||= Profile.(self)
end

#web_propertiesObject



20
21
22
# File 'lib/garb/management/account.rb', line 20

def web_properties
  @web_properties ||= WebProperty.(self)
end