Class: FbGraph::Page
- Extended by:
- Searchable
- Includes:
- Connections::Albums, Connections::Checkins, Connections::Events, Connections::Feed, Connections::Groups, Connections::Insights, Connections::Links, Connections::Notes, Connections::Photos, Connections::Picture, Connections::Posts, Connections::Statuses, Connections::Tagged, Connections::Videos, CategoryAttributes
- Defined in:
- lib/fb_graph/page.rb,
lib/fb_graph/page/category_attributes.rb
Defined Under Namespace
Modules: CategoryAttributes
Instance Attribute Summary collapse
-
#category ⇒ Object
Returns the value of attribute category.
-
#like_count ⇒ Object
Returns the value of attribute like_count.
-
#name ⇒ Object
Returns the value of attribute name.
-
#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 CategoryAttributes
included, #initialize_with_category_specific_attributes
Methods included from Connections::Videos
Methods included from Connections::Tagged
Methods included from Connections::Statuses
Methods included from Connections::Posts
Methods included from Connections::Picture
Methods included from Connections::Photos
Methods included from Connections::Notes
Methods included from Connections::Links
Methods included from Connections::Insights
Methods included from Connections::Groups
Methods included from Connections::Feed
Methods included from Connections::Events
Methods included from Connections::Checkins
Methods included from Connections::Albums
Methods inherited from Node
#connection, #destroy, fetch, #fetch, #update
Methods included from Comparison
Constructor Details
#initialize(identifier, attributes = {}) ⇒ Page
Returns a new instance of Page.
21 22 23 24 25 26 27 |
# File 'lib/fb_graph/page.rb', line 21 def initialize(identifier, attributes = {}) super [:name, :username, :category].each do |key| self.send :"#{key}=", attributes[key] end @like_count = attributes[:likes] || attributes[:fan_count] 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 |
#like_count ⇒ Object
Returns the value of attribute like_count.
19 20 21 |
# File 'lib/fb_graph/page.rb', line 19 def like_count @like_count end |
#name ⇒ Object
Returns the value of attribute name.
19 20 21 |
# File 'lib/fb_graph/page.rb', line 19 def name @name end |
#username ⇒ Object
Returns the value of attribute username.
19 20 21 |
# File 'lib/fb_graph/page.rb', line 19 def username @username end |