Class: CommandDesigner::Dsl

Inherits:
ContextFilters::Context
  • Object
show all
Defined in:
lib/command-designer/dsl.rb

Overview

Add support for command in Context using Filters

Instance Method Summary collapse

Instance Method Details

#command(command_name, *args) ⇒ String

evaluates the given command_name in current context (applies matching filters)

Parameters:

  • command_name (String)

    the command name to evaluate

  • args (String)

    rest of command arguments

Returns:

  • (String)

    the evaluated value of command name


17
18
19
20
21
# File 'lib/command-designer/dsl.rb', line 17

def command(command_name, *args)
  cmd = CommandDesigner::Command.new(command_name, *args)
  evaluate_filters(cmd, :change)
  cmd.command
end