lib/abstract_mapper/commands.rb in abstract_mapper-0.0.2 vs lib/abstract_mapper/commands.rb in abstract_mapper-0.1.0
- old
+ new
@@ -1,9 +1,11 @@
# encoding: utf-8
class AbstractMapper
+ require_relative "commands/base"
+
# Collection of DSL commands used by the builder
#
# @api private
#
class Commands
@@ -27,18 +29,18 @@
# @param [[Symbol, Class, Proc]] other
#
# @return [undefined]
#
def <<(other)
- command = Command.new(*other)
+ command = Base.new(*other)
self.class.new @registry.merge(command.name => command)
end
# Returns the registered command by name
#
# @param [#to_sym] name The name of the command
#
- # @return [AbstractMapper::Command]
+ # @return [AbstractMapper::Commands::Base]
#
# @raise [AbstractMapper::Errors::UnknownCommand]
# When unknown command is called
#
def [](name)