lib/rom/http/commands/create.rb in rom-http-0.4.0 vs lib/rom/http/commands/create.rb in rom-http-0.5.0

- old
+ new

@@ -1,10 +1,16 @@ module ROM module HTTP module Commands + # HTTP Create command + # + # @api public class Create < ROM::Commands::Create adapter :http + # Submits each of the provided tuples over HTTP post + # + # @api public def execute(tuples) Array([tuples]).flatten.map do |tuple| attributes = input[tuple] validator.call(attributes) relation.insert(attributes.to_h)