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_defer(&block) ⇒ Object
- #after_purchase(&block) ⇒ Object
- #before_decline(&block) ⇒ Object
- #before_defer(&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
85 86 87 |
# File 'app/models/concerns/acts_as_purchasable.rb', line 85 def after_decline(&block) send :define_method, :after_decline do |order, order_item| self.instance_exec(order, order_item, &block) end end |
#after_defer(&block) ⇒ Object
69 70 71 |
# File 'app/models/concerns/acts_as_purchasable.rb', line 69 def after_defer(&block) send :define_method, :after_defer do |order, order_item| self.instance_exec(order, order_item, &block) end end |
#after_purchase(&block) ⇒ Object
77 78 79 |
# File 'app/models/concerns/acts_as_purchasable.rb', line 77 def after_purchase(&block) send :define_method, :after_purchase do |order, order_item| self.instance_exec(order, order_item, &block) end end |
#before_decline(&block) ⇒ Object
81 82 83 |
# File 'app/models/concerns/acts_as_purchasable.rb', line 81 def before_decline(&block) send :define_method, :before_decline do |order, order_item| self.instance_exec(order, order_item, &block) end end |
#before_defer(&block) ⇒ Object
65 66 67 |
# File 'app/models/concerns/acts_as_purchasable.rb', line 65 def before_defer(&block) send :define_method, :before_defer do |order, order_item| self.instance_exec(order, order_item, &block) end end |
#before_purchase(&block) ⇒ Object
73 74 75 |
# File 'app/models/concerns/acts_as_purchasable.rb', line 73 def before_purchase(&block) send :define_method, :before_purchase do |order, order_item| self.instance_exec(order, order_item, &block) end end |