Method: Command::DSL::CommandDefinition#doesnt_undo

Defined in:
lib/command-set/dsl.rb

#doesnt_undoObject

Lets the interpreter know that this command intentionally doesn’t provide an undo block - that there’s nothing to undo. Use it for informational commands, primarily. Commands that neither declare that they ‘doesnt_undo’ nor provide an undo block will raise a warning to the user whenever they’re called.



439
440
441
442
# File 'lib/command-set/dsl.rb', line 439

def doesnt_undo
  define_method(:undoable?) { return true }
  define_method(:join_undo) {}
end