Sha256: d1117d478f8b5ca7819d551fbba1d083236f607c104718ff9a0bda28b4a9111c

Contents?: true

Size: 843 Bytes

Versions: 33

Compression:

Stored size: 843 Bytes

Contents

module FbGraph
  class AdCreative < Node

    ATTRS = [
      :id,
      :view_tag,
      :alt_view_tags,
      :creative_id,
      :type,
      :title,
      :body,
      :image_hash,
      :link_url,
      :name,
      :run_status,
      :preview_url,
      :count_current_adgroups,
      :facebook_object_id, # can't use object_id since it's a core ruby method
      :story_id,
      :image_url,
      :url_tags,
      :related_fan_page,
      :auto_update,
      :action_spec,
      :query_templates
    ]

    attr_accessor *ATTRS 
    def initialize(identifier, attributes = {})
      super
      set_attrs(attributes)
    end

    protected

    def set_attrs(attributes)
      ATTRS.each do |field|
        send("#{field}=", attributes[field.to_sym])
      end
      self.facebook_object_id = attributes[:object_id]
    end
  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
fb_graph-2.7.17 lib/fb_graph/ad_creative.rb
fb_graph-2.7.16 lib/fb_graph/ad_creative.rb
fb_graph-2.7.15 lib/fb_graph/ad_creative.rb
fb_graph-2.7.14 lib/fb_graph/ad_creative.rb
fb_graph-2.7.13 lib/fb_graph/ad_creative.rb
fb_graph-2.7.12 lib/fb_graph/ad_creative.rb
fb_graph-2.7.11 lib/fb_graph/ad_creative.rb
fb_graph-2.7.10 lib/fb_graph/ad_creative.rb
fb_graph-2.7.9 lib/fb_graph/ad_creative.rb
fb_graph-2.7.8 lib/fb_graph/ad_creative.rb
fb_graph-2.7.7 lib/fb_graph/ad_creative.rb
fb_graph-2.7.6 lib/fb_graph/ad_creative.rb
fb_graph-2.7.5 lib/fb_graph/ad_creative.rb
fb_graph-2.7.4 lib/fb_graph/ad_creative.rb
fb_graph-2.7.3 lib/fb_graph/ad_creative.rb
fb_graph-2.7.2 lib/fb_graph/ad_creative.rb
fb_graph-2.7.1 lib/fb_graph/ad_creative.rb
fb_graph-2.7.0 lib/fb_graph/ad_creative.rb
fb_graph-2.6.7 lib/fb_graph/ad_creative.rb
fb_graph-2.6.6 lib/fb_graph/ad_creative.rb