Class: FbGraph2::Page

Instance Attribute Summary

Attributes inherited from Node

#access_token, #id, #raw_attributes

Instance Method Summary collapse

Methods included from Edge::Videos

#video!, #videos

Methods included from Edge::Tagged

#tagged

Methods included from Edge::Statuses

#statuses

Methods included from Edge::PromotablePosts

#promotable_posts

Methods included from Edge::Posts

#posts

Methods included from Edge::Photos

#photo!, #photos

Methods included from Edge::Picture

#picture

Methods included from Edge::Offers

#offer!, #offers

Methods included from Edge::Milestones

#milestones

Methods included from Edge::Locations

#locations

Methods included from Edge::Links

#links

Methods included from Edge::GlobalBrandChildren

#global_brand_children

Methods included from Edge::Feed

#feed, #feed!

Methods included from Edge::Events

#events

Methods included from Edge::Blocked

#block!, #blocked, #blocked?, #unblock!

Methods included from Edge::Albums

#album!, #albums

Methods included from Edge::Admins

#admin?, #admins

Methods inherited from Node

#authenticate, #destroy, #edge, #edges, fetch, #fetch, inherited, #update

Constructor Details

#initialize(id, attributes = {}) ⇒ Page



49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# File 'lib/fb_graph2/page.rb', line 49

def initialize(id, attributes = {})
  super
  if attributes.include? :category_list
    self.category_list = attributes[:category_list].collect do |page_category|
      PageCategory.new page_category[:id], page_category
    end
  end
  if attributes.include? :context
    self.context = Struct::Context::PageContext.new attributes[:context]
  end
  if attributes.include? :location
    self.location = Struct::Location.new attributes[:location]
  end
  if attributes.include? :parking
    self.parking = Struct::Parking.new attributes[:parking]
  end
  if attributes.include? :restaurant_services
    self.restaurant_services = Struct::RestaurantServices.new attributes[:restaurant_services]
  end
  if attributes.include? :restaurant_specialties
    self.restaurant_specialties = Struct::RestaurantSpecialties.new attributes[:restaurant_specialties]
  end
  if attributes.include? :payment_options
    self.payment_options = Struct::PaymentOptions.new attributes[:payment_options]
  end
end