class Gaptool::InteractionHandler

Attributes

host[R]

Public Class Methods

new(host) click to toggle source
# File lib/gaptool_client/host.rb, line 9
def initialize(host)
  @host = host
end

Public Instance Methods

on_data(_command, stream_name, data, _channel) click to toggle source
# File lib/gaptool_client/host.rb, line 13
def on_data(_command, stream_name, data, _channel)
  case stream_name
  when :stdout
    puts "#{Rainbow("#{@host}").yellow}> #{data}"
  when :stderr
    STDERR.puts "#{Rainbow("#{@host}").red}> #{data}"
  end
end