Module: Binking
- Extended by:
- Binking
- Included in:
- Binking
- Defined in:
- lib/binking.rb,
lib/binking/client.rb,
lib/binking/config.rb,
lib/binking/fields.rb,
lib/binking/version.rb,
lib/binking/request_resource.rb
Defined Under Namespace
Modules: RequestResource
Classes: Client, Config, NotConfiguredError
Constant Summary
collapse
- FIELDS =
%w[
bankAlias
bankName
bankLocalName
bankLogoBigOriginalSvg
bankLogoBigOriginalPng
bankLogoBigInvertedSvg
bankLogoBigInvertedPng
bankLogoSmallOriginalSvg
bankLogoSmallOriginalPng
bankLogoSmallInvertedSvg
bankLogoSmallInvertedPng
bankColor
bankColors
bankCountry
bankSite
bankPhone
formBackgroundColor
formBackgroundColors
formBackgroundLightness
formTextColor
formBorderColor
formBankLogoBigSvg
formBankLogoBigPng
formBankLogoSmallSvg
formBankLogoSmallPng
formLogoScheme
].freeze
- VERSION =
"0.1.0"
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name, *args, &block) ⇒ Object
24
25
26
27
28
29
30
31
32
|
# File 'lib/binking.rb', line 24
def method_missing(method_name, *args, &block)
if i[form bank banks].include?(method_name)
raise NotConfiguredError unless configured?
RequestResource.get(method_name, *args)
else
super
end
end
|
Instance Method Details
13
14
15
16
17
|
# File 'lib/binking.rb', line 13
def configure
@config ||= Config.new
yield @config if block_given?
@config
end
|
20
21
22
|
# File 'lib/binking.rb', line 20
def configured?
config.configured?
end
|
#respond_to_missing?(method_name, include_private = false) ⇒ Boolean
34
35
36
|
# File 'lib/binking.rb', line 34
def respond_to_missing?(method_name, include_private = false)
connection.respond_to?(method_name) || super
end
|