Class: Guard::Garlando
- Inherits:
-
Plugin
- Object
- Plugin
- Guard::Garlando
- Defined in:
- lib/guard/garlando.rb
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Garlando
constructor
A new instance of Garlando.
- #start ⇒ Object
- #stop ⇒ Object
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(={}) super tuples = %w(-s -o -p -P -E).zip(.values_at *%i(server host port pid env)) @option = tuples.reject { |_, e| e.nil? }.map { |e| e * ' ' } * ' ' end |
Instance Method Details
#start ⇒ Object
9 10 11 |
# File 'lib/guard/garlando.rb', line 9 def start spawn 'garlando #{@option} &' end |
#stop ⇒ Object
13 14 15 |
# File 'lib/guard/garlando.rb', line 13 def stop system 'garlando stop' end |