lib/rom/commands/update.rb in rom-0.5.0 vs lib/rom/commands/update.rb in rom-0.6.0.beta1
- old
+ new
@@ -1,43 +1,19 @@
-require 'rom/commands/with_options'
+require 'rom/command'
module ROM
module Commands
# Update command
#
# This command updates all tuples in its relation with new attributes
#
# @abstract
- class Update < AbstractCommand
- include WithOptions
-
- alias_method :set, :call
-
+ class Update < Command
# @see AbstractCommand#call
def call(*args)
assert_tuple_count
super
end
-
- # Execute the update command
- #
- # @return [Array] an array with updated tuples
- #
- # @abstract
- #
- # @api private
- def execute(_params)
- raise(
- NotImplementedError,
- "#{self.class}##{__method__} must be implemented"
- )
- end
-
- # Return new update command with new relation
- #
- # @api private
- def new(*args, &block)
- self.class.new(relation.public_send(*args, &block), options)
- end
+ alias_method :set, :call
end
end
end