Class: Kitsune::Kit::Adapters::CommandResult

Inherits:
Data
  • Object
show all
Defined in:
lib/kitsune/kit/adapters/transport.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#duration_msObject (readonly)

Returns the value of attribute duration_ms

Returns:

  • (Object)

    the current value of duration_ms



6
7
8
# File 'lib/kitsune/kit/adapters/transport.rb', line 6

def duration_ms
  @duration_ms
end

#exit_statusObject (readonly)

Returns the value of attribute exit_status

Returns:

  • (Object)

    the current value of exit_status



6
7
8
# File 'lib/kitsune/kit/adapters/transport.rb', line 6

def exit_status
  @exit_status
end

#stderrObject (readonly)

Returns the value of attribute stderr

Returns:

  • (Object)

    the current value of stderr



6
7
8
# File 'lib/kitsune/kit/adapters/transport.rb', line 6

def stderr
  @stderr
end

#stdoutObject (readonly)

Returns the value of attribute stdout

Returns:

  • (Object)

    the current value of stdout



6
7
8
# File 'lib/kitsune/kit/adapters/transport.rb', line 6

def stdout
  @stdout
end

Instance Method Details

#success?Boolean

Returns:

  • (Boolean)


7
# File 'lib/kitsune/kit/adapters/transport.rb', line 7

def success? = exit_status.zero?

#to_hObject



9
10
11
# File 'lib/kitsune/kit/adapters/transport.rb', line 9

def to_h
  { stdout: stdout, stderr: stderr, exit_status: exit_status, duration_ms: duration_ms }
end