lib/reviewed/base.rb in reviewed-0.7.1 vs lib/reviewed/base.rb in reviewed-0.8.0

- old
+ new

@@ -5,13 +5,14 @@ include ::Reviewed::Embeddable extend ::ActiveModel::Naming - attr_accessor :attributes + attr_accessor :attributes, :client - def initialize(data) - self.attributes = objectify(data) + def initialize(data, client = Reviewed::Client.new) + @attributes = objectify(data) + @client = client end def created_at if @attributes.has_key?(:created_at) Time.parse(@attributes[:created_at])