Sha256: 3c50cb0f66fda885700f273ee51bf44024772a0d381342f5c471c4f8da129030
Contents?: true
Size: 603 Bytes
Versions: 34
Compression:
Stored size: 603 Bytes
Contents
module FbGraph class ReachEstimate < Node attr_accessor :users, :cpc_max, :cpc_median, :cpc_min, :cpm_max, :cpm_median, :cpm_min def initialize(attributes = {}) super # everything in a data node when getting reach estimate through an AdGroup attributes = attributes[:data] if attributes[:data] %w(users).each do |field| send("#{field}=", attributes[field.to_sym]) end %w(cpc_min cpc_median cpc_max cpm_min cpm_median cpm_max).each do |field| send("#{field}=", attributes[:bid_estimations][0][field.to_sym]) end end end end
Version data entries
34 entries across 34 versions & 1 rubygems