Class: FacebookAds::FieldTypes::AdObject
- Defined in:
- lib/facebook_ads/field_types/ad_object.rb
Instance Method Summary collapse
- #deserialize(value, session = nil) ⇒ Object
-
#initialize(ad_object_class) ⇒ AdObject
constructor
A new instance of AdObject.
- #serialize(value) ⇒ Object
Methods included from FacebookAds::FieldTypes
Constructor Details
#initialize(ad_object_class) ⇒ AdObject
Returns a new instance of AdObject.
12 13 14 |
# File 'lib/facebook_ads/field_types/ad_object.rb', line 12 def initialize(ad_object_class) @ad_object_class = ad_object_class end |
Instance Method Details
#deserialize(value, session = nil) ⇒ Object
16 17 18 |
# File 'lib/facebook_ads/field_types/ad_object.rb', line 16 def deserialize(value, session = nil) @ad_object_class.new(value, value.keys, session) end |
#serialize(value) ⇒ Object
20 21 22 |
# File 'lib/facebook_ads/field_types/ad_object.rb', line 20 def serialize(value) value.to_json end |