Class: Postmates::Objects::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/Postmates/objects/base.rb

Direct Known Subclasses

Delivery, DeliveryQuote

Constant Summary collapse

@@OBJECT_FIELDS =
[]

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Base

Returns a new instance of Base.



7
8
9
10
11
12
13
# File 'lib/Postmates/objects/base.rb', line 7

def initialize data
  data.each do |k,v|
    if @@OBJECT_FIELDS.include?(k.to_sym)
      send("#{k}=", v)
    end
  end
end