lib/net/ssh/session_command.rb in net-ssh-session-0.1.2 vs lib/net/ssh/session_command.rb in net-ssh-session-0.1.3

- old
+ new

@@ -35,8 +35,21 @@ # Get command string representation # @return [String] def to_s "[#{command}] => #{exit_code}, #{output.to_s.bytesize} bytes, #{duration} seconds" end + + # Get command hash representation + # @return [Hash] + def to_hash + { + 'command' => command, + 'output' => output, + 'exit_code' => exit_code, + 'start_time' => start_time, + 'finish_time' => finish_time, + 'duration' => duration + } + end end end end \ No newline at end of file