Class: Transactor::Improv::Transaction

Inherits:
Object
  • Object
show all
Defined in:
lib/transactor/improv/transaction.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#performanceObject (readonly)

Returns the value of attribute performance.



4
5
6
# File 'lib/transactor/improv/transaction.rb', line 4

def performance
  @performance
end

Instance Method Details

#actorObject



18
19
20
# File 'lib/transactor/improv/transaction.rb', line 18

def actor
  @performance.actor
end

#performObject



6
7
8
9
10
11
# File 'lib/transactor/improv/transaction.rb', line 6

def perform
  @transaction.performances << @performance
  @transaction.transaction! do
    performances.last.perform
  end
end

#resultObject



22
23
24
# File 'lib/transactor/improv/transaction.rb', line 22

def result
  @performance.result
end

#rollback(&block) ⇒ Object



13
14
15
16
# File 'lib/transactor/improv/transaction.rb', line 13

def rollback(&block)
  @performance.rollback(&block)
  self
end