Class: NulogyGraphqlApi::TransactionService::Dummy

Inherits:
Object
  • Object
show all
Defined in:
lib/nulogy_graphql_api/transaction_service.rb

Overview

TODO: Move to the spec folder

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#transactionObject (readonly)

Returns the value of attribute transaction.



31
32
33
# File 'lib/nulogy_graphql_api/transaction_service.rb', line 31

def transaction
  @transaction
end

Instance Method Details

#execute_in_transaction {|@transaction| ... } ⇒ Object

Yields:



33
34
35
36
37
# File 'lib/nulogy_graphql_api/transaction_service.rb', line 33

def execute_in_transaction
  @transaction = Transaction.new
  @was_called = true
  yield(@transaction)
end

#was_called?Boolean

Returns:

  • (Boolean)


39
40
41
# File 'lib/nulogy_graphql_api/transaction_service.rb', line 39

def was_called?
  @was_called
end