Module: Transaction

Defined in:
lib/transaction.rb,
lib/transaction/version.rb

Defined Under Namespace

Classes: Client, Error

Constant Summary collapse

STATUSES =
%i[queued processing success error].freeze
DEFAULT_ATTRIBUTES =
{
  status: :queued
}.freeze
VERSION =
'0.1.7'

Class Method Summary collapse

Class Method Details

.configure {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:

  • _self (Transaction)

    the object that the method was called on



15
16
17
# File 'lib/transaction.rb', line 15

def self.configure
  yield self
end

.redisObject



27
28
29
30
# File 'lib/transaction.rb', line 27

def self.redis
  # use default redis if not set
  @redis ||= Redis.new
end

.redis=(hash = {}) ⇒ Object



19
20
21
22
23
24
25
# File 'lib/transaction.rb', line 19

def self.redis=(hash = {})
  @redis = if hash.instance_of?(Redis)
             hash
           else
             Redis.new(hash)
           end
end