Class: Stall::Payments::Config
- Inherits:
-
Object
- Object
- Stall::Payments::Config
- Extended by:
- Utils::ConfigDSL
- Defined in:
- lib/stall/payments/config.rb
Instance Method Summary collapse
- #configure {|_self| ... } ⇒ Object
- #configure_urls(&block) ⇒ Object
- #method_missing(name, *args) ⇒ Object
-
#register_gateway(name, gateway) ⇒ Object
This mehtod allows for registering an in-app gateway that can be auto loaded without having to explicitly require it.
Methods included from Utils::ConfigDSL
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
Instance Method Details
#configure {|_self| ... } ⇒ Object
16 17 18 |
# File 'lib/stall/payments/config.rb', line 16 def configure yield self end |
#configure_urls(&block) ⇒ Object
20 21 22 |
# File 'lib/stall/payments/config.rb', line 20 def configure_urls(&block) Stall::Payments::UrlsConfig.config_block = block end |
#register_gateway(name, gateway) ⇒ Object
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
12 13 14 |
# File 'lib/stall/payments/config.rb', line 12 def register_gateway(name, gateway) Stall::Payments.gateways[name] = gateway end |