Class: FbGraph::AdConnectionObject
- Inherits:
-
Node
- Object
- Node
- FbGraph::AdConnectionObject
- Defined in:
- lib/fb_graph/ad_connection_object.rb
Constant Summary
- TYPES =
{ :page => 1, :application => 2, :event => 3, :place => 6, :domain => 7 }
- SUPPORTED_PLATFORM_TYPES =
{ :web => 1, :canvas => 2, :mobile_web => 3, :iphone => 4, :ipad => 5, :android => 6 }
Instance Attribute Summary (collapse)
-
- (Object) is_game
Returns the value of attribute is_game.
-
- (Object) name
Returns the value of attribute name.
-
- (Object) object
Returns the value of attribute object.
-
- (Object) og_actions
Returns the value of attribute og_actions.
-
- (Object) og_namespace
Returns the value of attribute og_namespace.
-
- (Object) og_objects
Returns the value of attribute og_objects.
-
- (Object) picture
Returns the value of attribute picture.
-
- (Object) supported_platforms
Returns the value of attribute supported_platforms.
-
- (Object) tabs
Returns the value of attribute tabs.
-
- (Object) type
Returns the value of attribute type.
-
- (Object) url
Returns the value of attribute url.
Attributes inherited from Node
#access_token, #endpoint, #identifier, #raw_attributes
Instance Method Summary (collapse)
-
- (AdConnectionObject) initialize(identifier, attributes = {})
constructor
A new instance of AdConnectionObject.
Methods inherited from Node
#connection, #destroy, fetch, #fetch, #update
Methods included from Comparison
Constructor Details
- (AdConnectionObject) initialize(identifier, attributes = {})
A new instance of AdConnectionObject
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/fb_graph/ad_connection_object.rb', line 22 def initialize(identifier, attributes = {}) super %w(name url type tabs picture).each do |field| send("#{field}=", attributes[field.to_sym]) end if self.type == TYPES[:application] %w(is_game og_actions og_namespace og_objects supported_platforms).each do |field| send("#{field}=", attributes[field.to_sym]) end 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
- (Object) is_game
Returns the value of attribute is_game
3 4 5 |
# File 'lib/fb_graph/ad_connection_object.rb', line 3 def is_game @is_game end |
- (Object) name
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 |
- (Object) og_actions
Returns the value of attribute og_actions
3 4 5 |
# File 'lib/fb_graph/ad_connection_object.rb', line 3 def og_actions @og_actions end |
- (Object) og_namespace
Returns the value of attribute og_namespace
3 4 5 |
# File 'lib/fb_graph/ad_connection_object.rb', line 3 def og_namespace @og_namespace end |
- (Object) og_objects
Returns the value of attribute og_objects
3 4 5 |
# File 'lib/fb_graph/ad_connection_object.rb', line 3 def og_objects @og_objects end |
- (Object) picture
Returns the value of attribute picture
3 4 5 |
# File 'lib/fb_graph/ad_connection_object.rb', line 3 def picture @picture end |
- (Object) supported_platforms
Returns the value of attribute supported_platforms
3 4 5 |
# File 'lib/fb_graph/ad_connection_object.rb', line 3 def supported_platforms @supported_platforms end |
- (Object) tabs
Returns the value of attribute tabs
3 4 5 |
# File 'lib/fb_graph/ad_connection_object.rb', line 3 def tabs @tabs end |
- (Object) type
Returns the value of attribute type
3 4 5 |
# File 'lib/fb_graph/ad_connection_object.rb', line 3 def type @type end |
- (Object) url
Returns the value of attribute url
3 4 5 |
# File 'lib/fb_graph/ad_connection_object.rb', line 3 def url @url end |