Class: ROM::LDAP::Commands::Create
- Inherits:
-
Commands::Create
- Object
- Commands::Create
- ROM::LDAP::Commands::Create
- Defined in:
- lib/rom/ldap/commands/create.rb
Instance Method Summary collapse
-
#execute(tuples) ⇒ Array<Entry>
Pass tuple(s) to relation for insertion.
Instance Method Details
#execute(tuples) ⇒ Array<Entry>
Pass tuple(s) to relation for insertion.
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 |