Method: FbGraph::Page#initialize
- Defined in:
- lib/fb_graph/page.rb
#initialize(identifier, attributes = {}) ⇒ Page
Returns a new instance of Page.
37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/fb_graph/page.rb', line 37 def initialize(identifier, attributes = {}) super @@attributes[:raw].each do |key| self.send :"#{key}=", attributes[key] end @link ||= "https://www.facebook.com/#{username || identifier}" @like_count = attributes[:likes] || attributes[:fan_count] @cover = if (cover = attributes[:cover]) Cover.new cover[:cover_id], cover end end |