Class: YahooGeminiClient::AdvertisersResponse
- Inherits:
-
BaseResponse
- Object
- BaseResponse
- YahooGeminiClient::AdvertisersResponse
- Defined in:
- lib/yahoo_gemini_client/responses/advertisers_response.rb
Instance Attribute Summary collapse
-
#advertisers ⇒ Object
Returns the value of attribute advertisers.
-
#errors ⇒ Object
Returns the value of attribute errors.
-
#timestamp ⇒ Object
Returns the value of attribute timestamp.
Instance Method Summary collapse
-
#initialize(json_response) ⇒ AdvertisersResponse
constructor
A new instance of AdvertisersResponse.
Methods inherited from BaseResponse
Constructor Details
#initialize(json_response) ⇒ AdvertisersResponse
Returns a new instance of AdvertisersResponse.
5 6 7 8 9 10 11 |
# File 'lib/yahoo_gemini_client/responses/advertisers_response.rb', line 5 def initialize(json_response) @errors = json_response[:errors] @timestamp = json_response[:timestamp] @advertisers = json_response[:response].map do |advertiser_hash| Advertiser.new(advertiser_hash) end end |
Instance Attribute Details
#advertisers ⇒ Object
Returns the value of attribute advertisers.
3 4 5 |
# File 'lib/yahoo_gemini_client/responses/advertisers_response.rb', line 3 def advertisers @advertisers end |
#errors ⇒ Object
Returns the value of attribute errors.
3 4 5 |
# File 'lib/yahoo_gemini_client/responses/advertisers_response.rb', line 3 def errors @errors end |
#timestamp ⇒ Object
Returns the value of attribute timestamp.
3 4 5 |
# File 'lib/yahoo_gemini_client/responses/advertisers_response.rb', line 3 def @timestamp end |