Module: BankOfBaku::Configuration
- Included in:
- BankOfBaku
- Defined in:
- lib/bank_of_baku/configuration.rb
Constant Summary collapse
- VALID_OPTIONS_KEYS =
%i[endpoint username password user_agent].freeze
- DEFAULT_USER_AGENT =
"BankOfBaku Ruby Gem #{BankOfBaku::VERSION}"
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.extended(base) ⇒ Object
10 11 12 |
# File 'lib/bank_of_baku/configuration.rb', line 10 def self.extended(base) base.reset end |
Instance Method Details
#configure {|_self| ... } ⇒ Object
14 15 16 |
# File 'lib/bank_of_baku/configuration.rb', line 14 def configure yield self end |
#default_options ⇒ Object
25 26 27 28 29 30 31 |
# File 'lib/bank_of_baku/configuration.rb', line 25 def { userName: username, password: password, language: 'en' } end |
#reset ⇒ Object
18 19 20 21 22 23 |
# File 'lib/bank_of_baku/configuration.rb', line 18 def reset VALID_OPTIONS_KEYS.each do |key| send("#{key}=", nil) end self.user_agent = DEFAULT_USER_AGENT end |