Class: FbGraph::Targeting
- Inherits:
-
Object
- Object
- FbGraph::Targeting
- Includes:
- Comparison
- Defined in:
- lib/fb_graph/targeting.rb
Instance Attribute Summary collapse
-
#city ⇒ Object
Returns the value of attribute city.
-
#country ⇒ Object
Returns the value of attribute country.
-
#locale ⇒ Object
Returns the value of attribute locale.
-
#region ⇒ Object
Returns the value of attribute region.
Instance Method Summary collapse
-
#initialize(attriutes = {}) ⇒ Targeting
constructor
A new instance of Targeting.
- #to_hash(options = {}) ⇒ Object
Methods included from Comparison
Constructor Details
#initialize(attriutes = {}) ⇒ Targeting
Returns a new instance of Targeting.
7 8 9 10 11 12 |
# File 'lib/fb_graph/targeting.rb', line 7 def initialize(attriutes = {}) @country = attriutes[:country] @city = attriutes[:city] @region = attriutes[:region] @locale = attriutes[:locale] end |
Instance Attribute Details
#city ⇒ Object
Returns the value of attribute city.
5 6 7 |
# File 'lib/fb_graph/targeting.rb', line 5 def city @city end |
#country ⇒ Object
Returns the value of attribute country.
5 6 7 |
# File 'lib/fb_graph/targeting.rb', line 5 def country @country end |
#locale ⇒ Object
Returns the value of attribute locale.
5 6 7 |
# File 'lib/fb_graph/targeting.rb', line 5 def locale @locale end |
#region ⇒ Object
Returns the value of attribute region.
5 6 7 |
# File 'lib/fb_graph/targeting.rb', line 5 def region @region end |
Instance Method Details
#to_hash(options = {}) ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/fb_graph/targeting.rb', line 14 def to_hash( = {}) { :country => self.country, :city => self.city, :region => self.region, :locale => self.locale } end |