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_ms ⇒ Object (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_status ⇒ Object (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

#stderr ⇒ Object (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

#stdout ⇒ Object (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_h ⇒ Object



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