Class: Guard::Garlando

Inherits:
Plugin
  • Object
show all
Defined in:
lib/guard/garlando.rb

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Garlando

Returns a new instance of Garlando.



3
4
5
6
7
# File 'lib/guard/garlando.rb', line 3

def initialize(options={})
  super
  tuples = %w(-s -o -p -P -E).zip(options.values_at *%i(server host port pid env))
  @option = tuples.reject { |_, e| e.nil? }.map { |e| e * ' ' } * ' '
end

Instance Method Details

#startObject



9
10
11
# File 'lib/guard/garlando.rb', line 9

def start
  spawn 'garlando #{@option} &'
end

#stopObject



13
14
15
# File 'lib/guard/garlando.rb', line 13

def stop
  system 'garlando stop'
end