Class: ROM::LDAP::Transaction Private

Inherits:
Transaction
  • Object
show all
Defined in:
lib/rom/ldap/transaction.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Work in progress

Instance Method Summary collapse

Constructor Details

#initialize(directory) ⇒ Transaction

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Transaction.



15
16
17
# File 'lib/rom/ldap/transaction.rb', line 15

def initialize(directory)
  @directory = directory
end

Instance Method Details

#run(opts = EMPTY_OPTS) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

rubocop:disable Lint/SuppressedException



20
21
22
23
24
# File 'lib/rom/ldap/transaction.rb', line 20

def run(opts = EMPTY_OPTS)
  directory.transaction(opts) { yield(self) }
rescue ::ROM::Transaction::Rollback
  # noop
end