module PrioTicket::Config

Configuration object for storing some parameters required for making transactions

Attributes

api_key[RW]
environment[RW]
verbose[RW]

Public Class Methods

init!() click to toggle source

Set's the default value's to nil and false @return [Hash] configuration options

# File lib/prioticket/config.rb, line 12
def init!
  @defaults = {
    :@api_key   => nil,
    :@environment => 'test',
    :@verbose => false,
  }
end
reset!() click to toggle source

Resets the value's to there previous value (instance_variable) @return [Hash] configuration options

# File lib/prioticket/config.rb, line 22
def reset!
  @defaults.each { |key, value| instance_variable_set(key, value) }
end
update!() click to toggle source

Set's the new value's as instance variables @return [Hash] configuration options

# File lib/prioticket/config.rb, line 28
def update!
  @defaults.each do |key, value|
    instance_variable_set(key, value) unless instance_variable_defined?(key)
  end
end