Class: TerminalVelocity::Templates::Runner

Inherits:
Object
  • Object
show all
Defined in:
lib/terminal_velocity/templates.rb

Direct Known Subclasses

AppleScripter, Screen

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(users_at_hostnames) ⇒ Runner

Returns a new instance of Runner.



12
13
14
# File 'lib/terminal_velocity/templates.rb', line 12

def initialize(users_at_hostnames)
  @users_at_hostnames = users_at_hostnames
end

Class Method Details

.run(username, hostnames, custom_options = { }) ⇒ Object



4
5
6
7
8
9
10
# File 'lib/terminal_velocity/templates.rb', line 4

def self.run(username, hostnames, custom_options = { })
  users_at_hostnames = hostnames.map { |hostname| "#{username}@#{hostname}" }

  runner = new(users_at_hostnames)
  runner.options.merge!(custom_options)
  runner.run
end

Instance Method Details

#optionsObject



21
22
23
# File 'lib/terminal_velocity/templates.rb', line 21

def options
  @options ||= { :term_theme => "Pro", :current_window => false}
end

#runObject



16
17
18
19
# File 'lib/terminal_velocity/templates.rb', line 16

def run
  generate_script
  launch
end