Class: FbGraph2::TaggedProfile

Inherits:
Node
  • Object
show all
Defined in:
lib/fb_graph2/tagged_profile.rb

Instance Attribute Summary

Attributes inherited from Node

#access_token, #id

Instance Method Summary collapse

Methods inherited from Node

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

Methods included from AttributeAssigner

#assign

Constructor Details

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

Returns a new instance of TaggedProfile.



8
9
10
11
# File 'lib/fb_graph2/tagged_profile.rb', line 8

def initialize(id, attributes = {})
  super
  self.object = klass.new self.id
end

Instance Method Details

#klassObject



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/fb_graph2/tagged_profile.rb', line 13

def klass
  klass = case self.type
  when 'user'
    User
  when 'page'
    Page
  when 'group'
    Group
  when 'event'
    Event
  when 'application'
    App
  else
    Node
  end
end