Class: BrwyRails::Runner
- Inherits:
-
Object
- Object
- BrwyRails::Runner
- Defined in:
- lib/brwy_rails/runner.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
Returns the value of attribute config.
Instance Method Summary collapse
-
#initialize(config) ⇒ Runner
constructor
A new instance of Runner.
- #run ⇒ Object
Constructor Details
#initialize(config) ⇒ Runner
Returns a new instance of Runner.
5 6 7 |
# File 'lib/brwy_rails/runner.rb', line 5 def initialize(config) @config = config end |
Instance Attribute Details
#config ⇒ Object
Returns the value of attribute config.
3 4 5 |
# File 'lib/brwy_rails/runner.rb', line 3 def config @config end |
Instance Method Details
#run ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/brwy_rails/runner.rb', line 9 def run if watching? pids = @config.targets.map {|target| run_with_watchify(target) } at_exit do pids.each {|pid| Process.exit(pid)} end else @config.targets.map {|target| run_with_browserify(target) } end end |