Class: FbGraph::Page
- Extended by:
- Searchable
- Includes:
- Connections::Admins, Connections::Albums, Connections::Blocked, Connections::Checkins, Connections::Events, Connections::Feed, Connections::Groups, Connections::Insights, Connections::Links, Connections::Notes, Connections::Photos, Connections::Picture, Connections::Posts, Connections::Settings, Connections::Statuses, Connections::Tabs, Connections::Tagged, Connections::Videos, CategoryAttributes
- Defined in:
- lib/fb_graph/page.rb,
lib/fb_graph/page/category_attributes.rb
Defined Under Namespace
Modules: CategoryAttributes
Constant Summary
Constants included from Connections::Settings
Connections::Settings::AVAILABLE_SETTINGS
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::Tabs
Methods included from Connections::Statuses
Methods included from Connections::Settings
#disable!, #enable!, included, #settings
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::Blocked
#block!, #blocked, #blocked?, #unblock!
Methods included from Connections::Albums
Methods included from Connections::Admins
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.
25 26 27 28 29 30 31 |
# File 'lib/fb_graph/page.rb', line 25 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.
23 24 25 |
# File 'lib/fb_graph/page.rb', line 23 def category @category end |
#like_count ⇒ Object
Returns the value of attribute like_count.
23 24 25 |
# File 'lib/fb_graph/page.rb', line 23 def like_count @like_count end |
#name ⇒ Object
Returns the value of attribute name.
23 24 25 |
# File 'lib/fb_graph/page.rb', line 23 def name @name end |
#username ⇒ Object
Returns the value of attribute username.
23 24 25 |
# File 'lib/fb_graph/page.rb', line 23 def username @username end |