Class: Guard::Exec::Runner

Inherits:
Object
  • Object
show all
Defined in:
lib/guard/exec/runner.rb

Constant Summary collapse

DEFAULT_NAME =
'command'.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Runner

Returns a new instance of Runner.



8
9
10
# File 'lib/guard/exec/runner.rb', line 8

def initialize(options)
  @options = options
end

Instance Attribute Details

#optionsObject

Returns the value of attribute options.



6
7
8
# File 'lib/guard/exec/runner.rb', line 6

def options
  @options
end

Instance Method Details

#run(paths = []) ⇒ Object



12
13
14
15
16
# File 'lib/guard/exec/runner.rb', line 12

def run(paths = [])
  command = build_command(paths)
  show_command(command)
  system(command)
end

#titleObject



18
19
20
# File 'lib/guard/exec/runner.rb', line 18

def title
  @title ||= "#{name.capitalize}".colorize(options[:color])
end