Class: Sevgi::Test::Shell::Result Private

Inherits:
Data
  • Object
show all
Defined in:
lib/sevgi/showcase/minitest/shell.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Shell command result.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#argsObject (readonly)

Returns the value of attribute args

Returns:

  • (Object)

    the current value of args



14
15
16
# File 'lib/sevgi/showcase/minitest/shell.rb', line 14

def args
  @args
end

#errObject (readonly)

Returns the value of attribute err

Returns:

  • (Object)

    the current value of err



14
15
16
# File 'lib/sevgi/showcase/minitest/shell.rb', line 14

def err
  @err
end

#exit_codeObject (readonly)

Returns the value of attribute exit_code

Returns:

  • (Object)

    the current value of exit_code



14
15
16
# File 'lib/sevgi/showcase/minitest/shell.rb', line 14

def exit_code
  @exit_code
end

#outObject (readonly)

Returns the value of attribute out

Returns:

  • (Object)

    the current value of out



14
15
16
# File 'lib/sevgi/showcase/minitest/shell.rb', line 14

def out
  @out
end

Instance Method Details

#cmdString

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns the command string.

Returns:

  • (String)


17
# File 'lib/sevgi/showcase/minitest/shell.rb', line 17

def cmd = args.join(" ")

#notok?Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Reports whether the command failed.

Returns:

  • (Boolean)


21
# File 'lib/sevgi/showcase/minitest/shell.rb', line 21

def notok? = !ok?

#ok?Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Reports whether the command exited successfully.

Returns:

  • (Boolean)


25
# File 'lib/sevgi/showcase/minitest/shell.rb', line 25

def ok? = exit_code&.zero?

#outlineString?

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns the first stdout line.

Returns:

  • (String, nil)


29
# File 'lib/sevgi/showcase/minitest/shell.rb', line 29

def outline = out.first

#to_sString

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns stdout as a newline-joined string.

Returns:

  • (String)


33
# File 'lib/sevgi/showcase/minitest/shell.rb', line 33

def to_s = out.join("\n")