Module: ActsAsPurchasableParent::ClassMethods

Defined in:
app/models/concerns/acts_as_purchasable_parent.rb

Instance Method Summary collapse

Instance Method Details

#acts_as_purchasable_parent?Boolean

Returns:

  • (Boolean)


14
# File 'app/models/concerns/acts_as_purchasable_parent.rb', line 14

def acts_as_purchasable_parent?; true; end

#after_decline(&block) ⇒ Object



24
25
26
# File 'app/models/concerns/acts_as_purchasable_parent.rb', line 24

def after_decline(&block)
  send :define_method, :after_decline do |order| self.instance_exec(order, &block) end
end

#after_purchase(&block) ⇒ Object



20
21
22
# File 'app/models/concerns/acts_as_purchasable_parent.rb', line 20

def after_purchase(&block)
  send :define_method, :after_purchase do |order| self.instance_exec(order, &block) end
end

#before_purchase(&block) ⇒ Object



16
17
18
# File 'app/models/concerns/acts_as_purchasable_parent.rb', line 16

def before_purchase(&block)
  send :define_method, :before_purchase do |order| self.instance_exec(order, &block) end
end