Class: LogView::DoSSH

Inherits:
Object
  • Object
show all
Includes:
Colors
Defined in:
lib/log_view/do_ssh.rb

Direct Known Subclasses

DoTail

Constant Summary

Constants included from Colors

Colors::COLOR_CODES

Instance Method Summary collapse

Methods included from Colors

#paint

Constructor Details

#initialize(project, obj_config) ⇒ DoSSH

Returns a new instance of DoSSH.



5
6
7
8
9
10
# File 'lib/log_view/do_ssh.rb', line 5

def initialize project, obj_config
  @project = project.to_s
  @thread_array = []
  @should_close = false
  @obj_config = obj_config
end

Instance Method Details

#closeObject



22
23
24
25
# File 'lib/log_view/do_ssh.rb', line 22

def close
  @should_close = true
  @thread_array.map(&:exit)
end

#startObject



12
13
14
15
16
17
18
19
20
# File 'lib/log_view/do_ssh.rb', line 12

def start
  each_server do |server|
    run_on_server(server) {|session, file|

      exec session, server, file

    }
  end
end