Class: StripeHelper::Configuration
- Inherits:
-
Object
- Object
- StripeHelper::Configuration
show all
- Defined in:
- lib/stripe_helper/configuration.rb
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object
7
8
9
10
11
12
13
|
# File 'lib/stripe_helper/configuration.rb', line 7
def method_missing(name, *args, &block)
if name.to_s.ends_with? '='
settings.send(:[]=, name.to_s.chomp('=').to_sym, *args)
else
settings.send(:[], name.to_sym, &block)
end
end
|
Instance Method Details
#settings ⇒ Object
3
4
5
|
# File 'lib/stripe_helper/configuration.rb', line 3
def settings
@@settings ||= {}
end
|