module EzpayInvoice::Configurable

Constants

MODES

Attributes

hash_iv[RW]
hash_key[RW]
merchant_id[RW]

Public Class Methods

attributes() click to toggle source
# File lib/ezpay-invoice/configurable.rb, line 25
def attributes
  @attributes ||= [
    :merchant_id,
    :hash_key,
    :hash_iv,
    :mode
  ]
end

Public Instance Methods

config() click to toggle source
# File lib/ezpay-invoice/configurable.rb, line 20
def config
  self
end
mode() click to toggle source
# File lib/ezpay-invoice/configurable.rb, line 7
def mode
  @mode ||= 'dev'
end
mode=(_mode) click to toggle source
# File lib/ezpay-invoice/configurable.rb, line 11
def mode=(_mode)
  raise ArgumentError, "mode must be one of [#{MODES.join(', ')}]." if !MODES.include?(_mode)
  @mode = _mode
end
setup() { |self| ... } click to toggle source
# File lib/ezpay-invoice/configurable.rb, line 16
def setup
  block_given? ? yield(self) : self
end