Method: Cmds#chomp

Defined in:
lib/cmds.rb

#chomp(*args, **kwds, &input_block) ⇒ String

captures and chomps stdout (sugar for #out(*subs, &input_block).chomp).

Parameters:

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

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

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

Returns:

  • the command's chomped stdout.

See Also:



427
428
429
# File 'lib/cmds.rb', line 427

def chomp *args, **kwds, &input_block
  out(*args, **kwds, &input_block).chomp
end