Class: Guard::Yardstick
- Inherits:
-
Plugin
- Object
- Plugin
- Guard::Yardstick
- Defined in:
- lib/guard/yardstick.rb
Overview
A guard plugin to run yardstick on every save
Instance Attribute Summary collapse
-
#options ⇒ Hash
readonly
private
A hash of options for configuring the plugin.
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ Guard::Yardstick
constructor
private
Initializes guard-yardstick.
-
#run_all ⇒ Void
private
Will run all files through yardstick.
-
#run_on_additions(paths) ⇒ Void
private
Will run when files are added.
-
#run_on_modifications(paths) ⇒ Void
private
Will run when files are changed.
-
#start ⇒ Void
private
When guard starts will run all files if :all_on_start is set.
Constructor Details
#initialize(args = {}) ⇒ Guard::Yardstick
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Initializes guard-yardstick
17 18 19 20 21 22 23 |
# File 'lib/guard/yardstick.rb', line 17 def initialize(args = {}) super = { all_on_start: true }.merge(args) end |
Instance Attribute Details
#options ⇒ Hash (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
A hash of options for configuring the plugin
11 12 13 |
# File 'lib/guard/yardstick.rb', line 11 def end |
Instance Method Details
#run_all ⇒ Void
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Will run all files through yardstick
37 38 39 40 41 |
# File 'lib/guard/yardstick.rb', line 37 def run_all UI.info 'Inspecting Yarddoc in all files' inspect_with_yardstick end |
#run_on_additions(paths) ⇒ Void
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Will run when files are added
47 48 49 |
# File 'lib/guard/yardstick.rb', line 47 def run_on_additions(paths) run_partially(paths) end |
#run_on_modifications(paths) ⇒ Void
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Will run when files are changed
55 56 57 |
# File 'lib/guard/yardstick.rb', line 55 def run_on_modifications(paths) run_partially(paths) end |
#start ⇒ Void
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
When guard starts will run all files if :all_on_start is set
29 30 31 |
# File 'lib/guard/yardstick.rb', line 29 def start run_all if [:all_on_start] end |