class PerfectMoneyMerchant::Configuration
Constants
- FIELDS
Attributes
tasks[R]
Public Class Methods
config()
click to toggle source
# File lib/perfect_money_merchant/configuration.rb, line 13 def config @config end
configure() { |config| ... }
click to toggle source
# File lib/perfect_money_merchant/configuration.rb, line 6 def configure @config ||= Configuration.new yield(@config) if block_given? # valid_fields! @config end
new()
click to toggle source
# File lib/perfect_money_merchant/configuration.rb, line 29 def initialize @tasks = Hashie::Mash.new end
valid_fields!()
click to toggle source
# File lib/perfect_money_merchant/configuration.rb, line 17 def valid_fields! raise StandardError.new('verification_secret is nil') if @config.verification_secret.nil? # if FIELDS.map { |field_name| @config.instance_variable_get("@#{field_name}") }.include?(nil) # raise StandardError.new('all fields must be initiated') # end end
Public Instance Methods
add_task(task_name, block)
click to toggle source
# File lib/perfect_money_merchant/configuration.rb, line 41 def add_task(task_name, block) @tasks ||= Hashie::Mash.new @tasks[task_name] = block end
verification_secret()
click to toggle source
# File lib/perfect_money_merchant/configuration.rb, line 33 def verification_secret if @verification_secret @verification_secret else raise StandardError.new('verification_secret is nil') end end