Sha256: cb9ede616781e8a1a3b8514dc61737ed18edf6d0129e20aaaf194870a6fdc9ed

Contents?: true

Size: 430 Bytes

Versions: 8

Compression:

Stored size: 430 Bytes

Contents

module ROM
  module HTTP
    module Commands
      class Update < ROM::Commands::Update
        adapter :http

        def execute(tuples)
          Array([tuples]).flatten.map do |tuple|
            attributes = input[tuple]
            validator.call(attributes)
            relation.update(attributes.to_h)
          end.to_a
        end

        def assert_tuple_count
          # noop
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
rom-http-0.4.0 lib/rom/http/commands/update.rb
rom-http-0.3.0 lib/rom/http/commands/update.rb
rom-http-0.2.0 lib/rom/http/commands/update.rb
rom-http-0.2.0.beta1 lib/rom/http/commands/update.rb
rom-http-0.1.2 lib/rom/http/commands/update.rb
rom-http-0.1.1 lib/rom/http/commands/update.rb
rom-http-0.1.0 lib/rom/http/commands/update.rb
rom-http-0.0.1 lib/rom/http/commands/update.rb