Class: PolishGeeks::DevTools::Commands::Yard
- Defined in:
- lib/polish_geeks/dev_tools/commands/yard.rb
Overview
Note:
It validates if everything is well documented
Command wrapper for Yard statistics
Constant Summary collapse
- MATCH_REGEXP =
Regexp used to match Yard output to check if there are things that are not documented or that include warnings
/(Undocumented Objects|warn)/i
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#execute ⇒ String
Executes this command.
-
#valid? ⇒ Boolean
True if everything is documented and without warnings.
Methods inherited from Base
#ensure_executable!, #error_message
Instance Method Details
#execute ⇒ String
Executes this command
15 16 17 |
# File 'lib/polish_geeks/dev_tools/commands/yard.rb', line 15 def execute @output = Shell.new.execute("bundle exec yard stats #{}") end |
#valid? ⇒ Boolean
Returns true if everything is documented and without warnings.
20 21 22 |
# File 'lib/polish_geeks/dev_tools/commands/yard.rb', line 20 def valid? output[MATCH_REGEXP].nil? end |