Module: ActsAsPurchasable::ClassMethods
- Defined in:
- app/models/concerns/acts_as_purchasable.rb
Instance Method Summary collapse
- #acts_as_purchasable? ⇒ Boolean
- #after_decline(&block) ⇒ Object
- #after_purchase(&block) ⇒ Object
- #before_purchase(&block) ⇒ Object
Instance Method Details
#acts_as_purchasable? ⇒ Boolean
63 |
# File 'app/models/concerns/acts_as_purchasable.rb', line 63 def acts_as_purchasable?; true; end |
#after_decline(&block) ⇒ Object
73 74 75 |
# File 'app/models/concerns/acts_as_purchasable.rb', line 73 def after_decline(&block) send :define_method, :after_decline do |order, order_item| self.instance_exec(order, order_item, &block) end end |
#after_purchase(&block) ⇒ Object
69 70 71 |
# File 'app/models/concerns/acts_as_purchasable.rb', line 69 def after_purchase(&block) send :define_method, :after_purchase do |order, order_item| self.instance_exec(order, order_item, &block) end end |
#before_purchase(&block) ⇒ Object
65 66 67 |
# File 'app/models/concerns/acts_as_purchasable.rb', line 65 def before_purchase(&block) send :define_method, :before_purchase do |order, order_item| self.instance_exec(order, order_item, &block) end end |