def when_called(*args, &block)
      fail ArgumentError, 'must pass an object, class, or block.' if args.empty? && !block

      @when_called = block ? [block] : args
    end
#
Handle execution of command. The handler may be a class,
object, or block (see examples below).

=== Examples

# Simple block handling
c.when_called do |args, options|
# do something
end

# Create inst of Something and pass args / options
c.when_called MyLib::Command::Something

# Create inst of Something and use arbitrary method
c.when_called MyLib::Command::Something, :some_method

# Pass an object to handle callback (requires method symbol)
c.when_called SomeObject, :some_method