Class: GSGraph::ReachEstimate
- Defined in:
- lib/gs_graph/reach_estimate.rb
Instance Attribute Summary collapse
-
#cpc_max ⇒ Object
Returns the value of attribute cpc_max.
-
#cpc_median ⇒ Object
Returns the value of attribute cpc_median.
-
#cpc_min ⇒ Object
Returns the value of attribute cpc_min.
-
#cpm_max ⇒ Object
Returns the value of attribute cpm_max.
-
#cpm_median ⇒ Object
Returns the value of attribute cpm_median.
-
#cpm_min ⇒ Object
Returns the value of attribute cpm_min.
-
#users ⇒ Object
Returns the value of attribute users.
Attributes inherited from Node
#access_token, #endpoint, #identifier, #raw_attributes
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ ReachEstimate
constructor
A new instance of ReachEstimate.
Methods inherited from Node
#connection, #destroy, fetch, #fetch, #update
Methods included from Comparison
Constructor Details
#initialize(attributes = {}) ⇒ ReachEstimate
Returns a new instance of ReachEstimate.
6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/gs_graph/reach_estimate.rb', line 6 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 |
Instance Attribute Details
#cpc_max ⇒ Object
Returns the value of attribute cpc_max.
4 5 6 |
# File 'lib/gs_graph/reach_estimate.rb', line 4 def cpc_max @cpc_max end |
#cpc_median ⇒ Object
Returns the value of attribute cpc_median.
4 5 6 |
# File 'lib/gs_graph/reach_estimate.rb', line 4 def cpc_median @cpc_median end |
#cpc_min ⇒ Object
Returns the value of attribute cpc_min.
4 5 6 |
# File 'lib/gs_graph/reach_estimate.rb', line 4 def cpc_min @cpc_min end |
#cpm_max ⇒ Object
Returns the value of attribute cpm_max.
4 5 6 |
# File 'lib/gs_graph/reach_estimate.rb', line 4 def cpm_max @cpm_max end |
#cpm_median ⇒ Object
Returns the value of attribute cpm_median.
4 5 6 |
# File 'lib/gs_graph/reach_estimate.rb', line 4 def cpm_median @cpm_median end |
#cpm_min ⇒ Object
Returns the value of attribute cpm_min.
4 5 6 |
# File 'lib/gs_graph/reach_estimate.rb', line 4 def cpm_min @cpm_min end |
#users ⇒ Object
Returns the value of attribute users.
4 5 6 |
# File 'lib/gs_graph/reach_estimate.rb', line 4 def users @users end |