class FbGraph2::User
Public Class Methods
me(access_token)
click to toggle source
# File lib/fb_graph2/user.rb, line 102 def self.me(access_token) new(:me).authenticate access_token end
new(id, attributes = {})
click to toggle source
Calls superclass method
FbGraph2::Node::new
# File lib/fb_graph2/user.rb, line 74 def initialize(id, attributes = {}) super if attributes.include? :age_range self.age_range = Struct::AgeRange.new attributes[:age_range] end if attributes.include? :context self.context = Struct::Context::UserContext.new attributes[:context] end if attributes.include? :currency self.currency = Struct::Currency.new attributes[:currency] end if attributes.include? :devices self.devices = attributes[:devices].collect do |device| Struct::Device.new device end end if attributes.include? :education self.education = attributes[:education].collect do |education| Struct::Education.new education end end if attributes.include? :work self.work = attributes[:work].collect do |work| Struct::Work.new work end end end