class Stall::Payments::Config
Public Instance Methods
configure() { |self| ... }
click to toggle source
# File lib/stall/payments/config.rb, line 16 def configure yield self end
configure_urls(&block)
click to toggle source
# File lib/stall/payments/config.rb, line 20 def configure_urls(&block) Stall::Payments::UrlsConfig.config_block = block end
method_missing(name, *args) { |gateway| ... }
click to toggle source
Calls superclass method
# File lib/stall/payments/config.rb, line 24 def method_missing(name, *args) if (gateway = Stall::Payments::Gateway.for(name)) if block_given? yield gateway else gateway end else super end end
register_gateway(name, gateway)
click to toggle source
This mehtod allows for registering an in-app gateway that can be auto loaded without having to explicitly require it
Use a string representing the gateway name if the target class is auto-loaded by Rails
# File lib/stall/payments/config.rb, line 12 def register_gateway(name, gateway) Stall::Payments.gateways[name] = gateway end