Module: Settlebox
- Defined in:
- lib/settlebox.rb,
lib/settlebox/crypt.rb,
lib/settlebox/railtie.rb,
lib/settlebox/version.rb,
lib/settlebox/view_helpers.rb
Defined Under Namespace
Modules: Crypt, ViewHelpers
Classes: Configuration, Railtie, SettleboxConfigError, SettleboxError
Constant Summary
collapse
- VERSION =
"0.0.1"
- API_VERSION =
1
Class Method Summary
collapse
Class Method Details
.config {|configuration| ... } ⇒ Object
22
23
24
25
26
27
28
|
# File 'lib/settlebox.rb', line 22
def self.config
yield(configuration) if block_given?
raise SettleboxConfigError.new("api_key can't be blank") if @configuration.api_key == nil
raise SettleboxConfigError.new("api_secret needs to be 64 charachters long") if @configuration.api_secret.length != 64
raise SettleboxConfigError.new("language not supported") unless [:en, :sv].include?(@configuration.language)
end
|
.configuration ⇒ Object
18
19
20
|
# File 'lib/settlebox.rb', line 18
def self.configuration
@configuration ||= Configuration.new
end
|