lib/inch/cli/command/options/base.rb in inch-0.4.6 vs lib/inch/cli/command/options/base.rb in inch-0.4.7

- old
+ new

@@ -1,6 +1,6 @@ -require 'optparse' +require "optparse" module Inch module CLI module Command # The classes in the Command::Options namespace are concerned with @@ -89,22 +89,22 @@ # Returns a decriptive hint explaining the arrows used to represent # code object priorities # # @return [String] def description_hint_arrows - arrows = Evaluation::PriorityRange.all.map(&:arrow).join(' ') - "Arrows (#{arrows}) hint at the importance of the object " + + arrows = Evaluation::PriorityRange.all.map(&:arrow).join(" ") + "Arrows (#{arrows}) hint at the importance of the object " \ "being documented." end # Returns a decriptive hint explaining the arrows used to represent # code object grades # # @return [String] def description_hint_grades grades = Evaluation::Grade.all - "School grades (#{grades.join(', ')}) are assigned and " + + "School grades (#{grades.join(", ")}) are assigned and " \ "displayed with each object." end DEFAULT_PATHS = ["{lib,app}/**/*.rb", "ext/**/*.c"] @@ -124,17 +124,17 @@ # @return [void] def common_options(opts) opts.separator "" opts.separator "Other options:" opts.on("--[no-]color", "Run without color") do |v| - Term::ANSIColor::coloring = v + Term::ANSIColor.coloring = v end - opts.on_tail('-v', '--version', 'Show version.') do + opts.on_tail("-v", "--version", "Show version.") do ui.trace "inch #{Inch::VERSION}" exit end - opts.on_tail('-h', '--help', 'Show this help.') do + opts.on_tail("-h", "--help", "Show this help.") do ui.trace opts exit end end @@ -163,10 +163,10 @@ end # Resets the command-line interface before each run def reset # color is enabled by default, can be turned of by switch --no-color - Term::ANSIColor::coloring = true + Term::ANSIColor.coloring = true end # Callback when an unrecognize option is parsed # # @param [OptionParser::ParseError] err the exception raised by the