Class: Guard::Ronn::Runner
- Inherits:
-
Object
- Object
- Guard::Ronn::Runner
- Defined in:
- lib/guard/ronn/runner.rb
Instance Attribute Summary collapse
-
#notifier ⇒ Object
readonly
Returns the value of attribute notifier.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Runner
constructor
A new instance of Runner.
- #run(paths, options = {}) ⇒ Object
Constructor Details
permalink #initialize(options = {}) ⇒ Runner
Returns a new instance of Runner.
7 8 9 10 |
# File 'lib/guard/ronn/runner.rb', line 7 def initialize( = {}) @options = @notifier = Notifier.new end |
Instance Attribute Details
permalink #notifier ⇒ Object (readonly)
Returns the value of attribute notifier.
5 6 7 |
# File 'lib/guard/ronn/runner.rb', line 5 def notifier @notifier end |
Instance Method Details
permalink #run(paths, options = {}) ⇒ Object
[View source]
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/guard/ronn/runner.rb', line 12 def run(paths, = {}) return false if paths.empty? = @options.merge() = [:message] || "Running: #{paths.join(' ')}" Compat::UI.info(, reset: true) result = system(ronn_command(paths, )) @notifier.notify(result) end |