Module: Rodish::Plugins::Is::DSLMethods

Defined in:
lib/rodish/plugins/is.rb

Instance Method Summary collapse

Instance Method Details

#is(command_name, args: 0, &block) ⇒ Object

A shortcut for calling on and run.

is "hello" do
  :world
end

is equivalent to:

on "hello" do
  run do
    :world
  end
end

The args argument sets the number of arguments supported by the command.



47
48
49
# File 'lib/rodish/plugins/is.rb', line 47

def is(command_name, args: 0, &block)
  _is(:on, command_name, args:, &block)
end