Class: FbGraph::Page
- Extended by:
- Searchable
- Includes:
- Connections::Albums, Connections::Checkins, Connections::Events, Connections::Feed, Connections::Groups, Connections::Links, Connections::Members, Connections::Notes, Connections::Photos, Connections::Picture, Connections::Posts, Connections::Statuses, Connections::Tagged, Connections::Videos
- Defined in:
- lib/fb_graph/page.rb
Instance Attribute Summary collapse
-
#category ⇒ Object
Returns the value of attribute category.
-
#company_overview ⇒ Object
Returns the value of attribute company_overview.
-
#fan_count ⇒ Object
Returns the value of attribute fan_count.
-
#founded ⇒ Object
Returns the value of attribute founded.
-
#link ⇒ Object
Returns the value of attribute link.
-
#location ⇒ Object
Returns the value of attribute location.
-
#mission ⇒ Object
Returns the value of attribute mission.
-
#name ⇒ Object
Returns the value of attribute name.
-
#products ⇒ Object
Returns the value of attribute products.
-
#username ⇒ Object
Returns the value of attribute username.
Attributes inherited from Node
#access_token, #endpoint, #identifier
Instance Method Summary collapse
-
#initialize(identifier, attributes = {}) ⇒ Page
constructor
A new instance of Page.
Methods included from Searchable
Methods included from Connections::Checkins
Methods included from Connections::Events
Methods included from Connections::Members
Methods included from Connections::Posts
Methods included from Connections::Notes
Methods included from Connections::Videos
Methods included from Connections::Statuses
Methods included from Connections::Albums
Methods included from Connections::Groups
Methods included from Connections::Photos
Methods included from Connections::Links
Methods included from Connections::Tagged
Methods included from Connections::Picture
Methods included from Connections::Feed
Methods inherited from Node
#connection, #destroy, fetch, #fetch
Methods included from Comparison
Constructor Details
#initialize(identifier, attributes = {}) ⇒ Page
Returns a new instance of Page.
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/fb_graph/page.rb', line 21 def initialize(identifier, attributes = {}) super @name = attributes[:name] @username = attributes[:username] @link = attributes[:link] @category = attributes[:category] if (founded = attributes[:founded]) @founded = Date.parse(founded) rescue Date.new(founded.to_i) end @company_overview = attributes[:company_overview] @mission = attributes[:mission] if (products = attributes[:products]) @products = products.split "\n" end @fan_count = attributes[:fan_count] if (location = attributes[:location]) @venue = FbGraph::Venue.new(location) end end |
Instance Attribute Details
#category ⇒ Object
Returns the value of attribute category.
19 20 21 |
# File 'lib/fb_graph/page.rb', line 19 def category @category end |
#company_overview ⇒ Object
Returns the value of attribute company_overview.
19 20 21 |
# File 'lib/fb_graph/page.rb', line 19 def company_overview @company_overview end |
#fan_count ⇒ Object
Returns the value of attribute fan_count.
19 20 21 |
# File 'lib/fb_graph/page.rb', line 19 def fan_count @fan_count end |
#founded ⇒ Object
Returns the value of attribute founded.
19 20 21 |
# File 'lib/fb_graph/page.rb', line 19 def founded @founded end |
#link ⇒ Object
Returns the value of attribute link.
19 20 21 |
# File 'lib/fb_graph/page.rb', line 19 def link @link end |
#location ⇒ Object
Returns the value of attribute location.
19 20 21 |
# File 'lib/fb_graph/page.rb', line 19 def location @location end |
#mission ⇒ Object
Returns the value of attribute mission.
19 20 21 |
# File 'lib/fb_graph/page.rb', line 19 def mission @mission end |
#name ⇒ Object
Returns the value of attribute name.
19 20 21 |
# File 'lib/fb_graph/page.rb', line 19 def name @name end |
#products ⇒ Object
Returns the value of attribute products.
19 20 21 |
# File 'lib/fb_graph/page.rb', line 19 def products @products end |
#username ⇒ Object
Returns the value of attribute username.
19 20 21 |
# File 'lib/fb_graph/page.rb', line 19 def username @username end |