Module: Supercharged::Helpers

Defined in:
lib/supercharged/helpers.rb

Class Method Summary collapse

Class Method Details

.gateway(name) ⇒ Object



6
7
8
# File 'lib/supercharged/helpers.rb', line 6

def self.gateway(name)
  @gateways[name.to_sym] || raise("Gateway not registered")
end

.init_gateway(name, options) ⇒ Object



10
11
12
13
14
# File 'lib/supercharged/helpers.rb', line 10

def self.init_gateway(name, options)
  klass = gateway_class_by_name(name)
  gateway = klass.new(options)
  add_gateway(name, gateway)
end

.init_integration(name, options) ⇒ Object



16
17
18
# File 'lib/supercharged/helpers.rb', line 16

def self.init_integration(name, options)
  @integrations_options[name.to_sym] = options
end

.integrations_options(name) ⇒ Object



20
21
22
# File 'lib/supercharged/helpers.rb', line 20

def self.integrations_options(name)
  @integrations_options[name.to_sym]
end