Class: Gexp::Mongoid::Transaction::Instance

Inherits:
Object
  • Object
show all
Includes:
Mongoid::Document
Defined in:
lib/gexp/mongoid/transaction.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Instance

Returns a new instance of Instance.



45
46
47
48
# File 'lib/gexp/mongoid/transaction.rb', line 45

def initialize(*args)
  super(*args)
  Observer.start_transaction!(self)
end

Instance Attribute Details

#errorObject

Returns the value of attribute error.



40
41
42
# File 'lib/gexp/mongoid/transaction.rb', line 40

def error
  @error
end

#operationObject

Returns the value of attribute operation.



40
41
42
# File 'lib/gexp/mongoid/transaction.rb', line 40

def operation
  @operation
end

Instance Method Details

#commitObject



55
56
# File 'lib/gexp/mongoid/transaction.rb', line 55

def commit
end

#deleteObject



50
51
52
53
# File 'lib/gexp/mongoid/transaction.rb', line 50

def delete
  Observer.finish_transaction!
  super
end