Class: Garb::Management::WebProperty
- Inherits:
-
Object
- Object
- Garb::Management::WebProperty
- Extended by:
- Attributes
- Includes:
- PathAttribute
- Defined in:
- lib/garb/management/web_property.rb
Instance Attribute Summary collapse
-
#entry ⇒ Object
readonly
Returns the value of attribute entry.
-
#session ⇒ Object
readonly
Returns the value of attribute session.
Class Method Summary collapse
- .all(session = Session, path = '/accounts/~all/webproperties') ⇒ Object
- .for_account(account) ⇒ Object
Instance Method Summary collapse
- #goals ⇒ Object
-
#initialize(entry, session) ⇒ WebProperty
constructor
A new instance of WebProperty.
- #profiles ⇒ Object
Methods included from Attributes
Methods included from PathAttribute
Constructor Details
#initialize(entry, session) ⇒ WebProperty
Returns a new instance of WebProperty.
19 20 21 22 |
# File 'lib/garb/management/web_property.rb', line 19 def initialize(entry, session) @entry = entry @session = session end |
Instance Attribute Details
#entry ⇒ Object (readonly)
Returns the value of attribute entry.
7 8 9 |
# File 'lib/garb/management/web_property.rb', line 7 def entry @entry end |
#session ⇒ Object (readonly)
Returns the value of attribute session.
7 8 9 |
# File 'lib/garb/management/web_property.rb', line 7 def session @session end |
Class Method Details
.all(session = Session, path = '/accounts/~all/webproperties') ⇒ Object
10 11 12 13 |
# File 'lib/garb/management/web_property.rb', line 10 def self.all(session = Session, path = '/accounts/~all/webproperties') feed = Feed.new(session, path) feed.entries.map { |entry| new(entry, session) } end |
.for_account(account) ⇒ Object
15 16 17 |
# File 'lib/garb/management/web_property.rb', line 15 def self.for_account(account) all(account.session, account.path + '/webproperties') end |
Instance Method Details
#goals ⇒ Object
28 29 30 |
# File 'lib/garb/management/web_property.rb', line 28 def goals @goals ||= Goal.for_web_property(self) end |
#profiles ⇒ Object
24 25 26 |
# File 'lib/garb/management/web_property.rb', line 24 def profiles @profiles ||= Profile.for_web_property(self) end |