Class: Garb::Management::Account
- Inherits:
-
Object
- Object
- Garb::Management::Account
- Extended by:
- Attributes
- Includes:
- PathAttribute
- Defined in:
- lib/garb/management/account.rb
Instance Attribute Summary collapse
-
#session ⇒ Object
readonly
Returns the value of attribute session.
Class Method Summary collapse
Instance Method Summary collapse
- #goals ⇒ Object
-
#initialize(entry, session) ⇒ Account
constructor
A new instance of Account.
- #profiles ⇒ Object
- #web_properties ⇒ Object
Methods included from Attributes
Methods included from PathAttribute
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
#session ⇒ Object (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
#goals ⇒ Object
28 29 30 |
# File 'lib/garb/management/account.rb', line 28 def goals @goals ||= Goal.for_account(self) end |
#profiles ⇒ Object
24 25 26 |
# File 'lib/garb/management/account.rb', line 24 def profiles @profiles ||= Profile.for_account(self) end |
#web_properties ⇒ Object
20 21 22 |
# File 'lib/garb/management/account.rb', line 20 def web_properties @web_properties ||= WebProperty.for_account(self) end |