Class: FbGraph::AdConnectionObject
- Defined in:
- lib/fb_graph/ad_connection_object.rb
Constant Summary collapse
- TYPES =
{ :page => 1, :application => 2, :event => 3, :place => 6, :domain => 7 }
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#object ⇒ Object
Returns the value of attribute object.
-
#picture ⇒ Object
Returns the value of attribute picture.
-
#tabs ⇒ Object
Returns the value of attribute tabs.
-
#type ⇒ Object
Returns the value of attribute type.
-
#url ⇒ Object
Returns the value of attribute url.
Attributes inherited from Node
#access_token, #endpoint, #identifier, #raw_attributes
Instance Method Summary collapse
-
#initialize(identifier, attributes = {}) ⇒ AdConnectionObject
constructor
A new instance of AdConnectionObject.
Methods inherited from Node
#connection, #destroy, fetch, #fetch, #update
Methods included from Comparison
Constructor Details
#initialize(identifier, attributes = {}) ⇒ AdConnectionObject
Returns a new instance of AdConnectionObject.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/fb_graph/ad_connection_object.rb', line 13 def initialize(identifier, attributes = {}) super %w(name url type tabs picture).each do |field| send("#{field}=", attributes[field.to_sym]) end self.object = if page? FbGraph::Page.new(identifier) elsif application? FbGraph::Application.new(identifier) elsif event? FbGraph::Event.new(identifier) elsif place? FbGraph::Place.new(identifier) elsif domain? FbGraph::Domain.new(identifier) end end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/fb_graph/ad_connection_object.rb', line 3 def name @name end |
#object ⇒ Object
Returns the value of attribute object.
3 4 5 |
# File 'lib/fb_graph/ad_connection_object.rb', line 3 def object @object end |
#picture ⇒ Object
Returns the value of attribute picture.
3 4 5 |
# File 'lib/fb_graph/ad_connection_object.rb', line 3 def picture @picture end |
#tabs ⇒ Object
Returns the value of attribute tabs.
3 4 5 |
# File 'lib/fb_graph/ad_connection_object.rb', line 3 def tabs @tabs end |
#type ⇒ Object
Returns the value of attribute type.
3 4 5 |
# File 'lib/fb_graph/ad_connection_object.rb', line 3 def type @type end |
#url ⇒ Object
Returns the value of attribute url.
3 4 5 |
# File 'lib/fb_graph/ad_connection_object.rb', line 3 def url @url end |