Class: FbGraph2::AppLinkHost

Inherits:
Node
  • Object
show all
Defined in:
lib/fb_graph2/app_link_host.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 = {}) ⇒ AppLinkHost

Returns a new instance of AppLinkHost.



8
9
10
11
12
13
14
15
16
17
18
# File 'lib/fb_graph2/app_link_host.rb', line 8

def initialize(id, attributes = {})
  super
  [:ios, :iphone, :ipad, :android, :windows_phone].each do |link_attr|
    if attributes.include? link_attr
      self.send :"#{link_attr}=", collect_links(attributes, link_attr)
    end
  end
  if attributes.include? :web
    self.web = Struct::AppLink::Web.new attributes[:web]
  end
end