lib/access/spot.rb in access-2.0.26 vs lib/access/spot.rb in access-2.0.27

- old
+ new

@@ -12,17 +12,18 @@ def self.find(spot_key, options = {}) Access::Api.new.find_spot spot_key, options end def self.process_batch(chunk) - chunk.map { |campaign| new(campaign) } + chunk.map { |spot| new(spot) } end def initialize(values) self.class.class_eval {attr_reader *values.keys } values.each do |attribute_name, attribute_value| self.instance_variable_set("@#{attribute_name}", attribute_value) end + @offer_resource = Access::Offer.new(@offer_resource) if @offer_resource @links = Access::Link.process_batch(@links) if @links end end end