Class: Garb::Management::WebProperty

Inherits:
Object
  • Object
show all
Extended by:
Attributes
Includes:
PathAttribute
Defined in:
lib/garb/management/web_property.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) ⇒ 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

#entryObject (readonly)

Returns the value of attribute entry.



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

def entry
  @entry
end

#sessionObject (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.()
  all(.session, .path + '/webproperties')
end

Instance Method Details

#goalsObject



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

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

#profilesObject



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

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