Module: Servitium::TransactionalMixin::ClassMethods

Defined in:
lib/servitium/transactional_mixin.rb

Instance Method Summary collapse

Instance Method Details

#transactional(value = nil) ⇒ Object



12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/servitium/transactional_mixin.rb', line 12

def transactional(value = nil)
  @transactional = value unless value.nil?
  @transactional = nil unless defined?(@transactional)
  if @transactional.nil?
    @transactional = if superclass < Servitium::Service
      superclass.transactional
    else
      false
    end
  end
  @transactional
end