Class: Locomotive::Ecommerce::PurchaseDrop
- Inherits:
-
Liquid::Drop
- Object
- Liquid::Drop
- Locomotive::Ecommerce::PurchaseDrop
show all
- Defined in:
- app/models/locomotive/ecommerce/purchase.rb
Instance Method Summary
collapse
Constructor Details
Returns a new instance of PurchaseDrop.
151
152
153
|
# File 'app/models/locomotive/ecommerce/purchase.rb', line 151
def initialize(source)
@source = source
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(meth, *args, &block) ⇒ Object
171
172
173
174
175
176
177
|
# File 'app/models/locomotive/ecommerce/purchase.rb', line 171
def method_missing(meth, *args, &block)
if @source.shipping_info.key?(meth)
@source.shipping_info[meth]
else
super
end
end
|
Instance Method Details
#date ⇒ Object
159
160
161
|
# File 'app/models/locomotive/ecommerce/purchase.rb', line 159
def date
@source.updated_at
end
|
#id ⇒ Object
155
156
157
|
# File 'app/models/locomotive/ecommerce/purchase.rb', line 155
def id
@source.id.to_s
end
|