Class: Patriarch::TransactionServices::TransactionManagerService

Inherits:
ManagerService
  • Object
show all
Defined in:
lib/patriarch/transaction_services/transaction_manager_service.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#countObject

Fill with logic to manage ressources with transactions … Can registers transactions and so on …



10
11
12
# File 'lib/patriarch/transaction_services/transaction_manager_service.rb', line 10

def count
  @count
end

Instance Method Details

#incr_countObject



18
19
20
21
# File 'lib/patriarch/transaction_services/transaction_manager_service.rb', line 18

def incr_count
  @count ||= 0
  @count += 1
end

#new_transaction(type) ⇒ Object



12
13
14
15
16
# File 'lib/patriarch/transaction_services/transaction_manager_service.rb', line 12

def new_transaction(type)
  id = Time.now.to_f
  incr_count
  Patriarch::Transaction.new(type,id)
end