Method: Cmds#error?

Defined in:
lib/cmds.rb

#error?(*args, **kwds, &io_block) ⇒ Boolean

execute command and return true if it failed.

Parameters:

  • *args (Array<Object>)

    positional parameters to append to those in @args for rendering into the command string.

  • **kwds (Hash{Symbol => Object})

    keyword parameters that override those in @kwds for rendering into the command string.

  • &input_block (#call)

    optional block that returns a string or readable object to override @input.

Returns:

  • (Boolean)

    true if exit code was not 0.



367
368
369
# File 'lib/cmds.rb', line 367

def error? *args, **kwds, &io_block
  stream(*args, **kwds, &io_block) != 0
end