Class: ROM::LDAP::Commands::Create

Inherits:
Commands::Create
  • Object
show all
Defined in:
lib/rom/ldap/commands/create.rb

Instance Method Summary collapse

Instance Method Details

#execute(tuples) ⇒ Array<Entry>

Pass tuple(s) to relation for insertion.

Parameters:

  • tuples (Hash, Array<Hash>)

Returns:

  • (Array<Entry>)


21
22
23
24
25
# File 'lib/rom/ldap/commands/create.rb', line 21

def execute(tuples)
  Array([tuples]).flatten(1).map do |tuple|
    relation.insert(tuple)
  end
end