class Guard::RubyCritic
Public Instance Methods
critique(paths)
click to toggle source
# File lib/guard/rubycritic.rb, line 30 def critique(paths) @rubycritic.paths = paths @rubycritic.critique end
report(analysed_modules)
click to toggle source
# File lib/guard/rubycritic.rb, line 35 def report(analysed_modules) ::RubyCritic::Generator::HtmlGuardReport.new(analysed_modules).generate_report end
run_on_changes(paths)
click to toggle source
Default behaviour on file(s) changes that the Guard
plugin watches. @param [Array<String>] paths the changes files or paths @raise [:task_has_failed] when run_on_change has failed @return [Object] the task result
# File lib/guard/rubycritic.rb, line 25 def run_on_changes(paths) report_location = report(critique(paths)) UI.info "New critique at #{report_location}" end
start()
click to toggle source
Called once when Guard
starts. Please override initialize method to init stuff.
@raise [:task_has_failed] when start has failed @return [Object] the task result
# File lib/guard/rubycritic.rb, line 14 def start @rubycritic = ::RubyCritic::CommandFactory.create @rubycritic.extend(AdditionalMethodsForGuard) UI.info "Guard::RubyCritic is critiquing" end