rubocop sucks

This commit is contained in:
Eric Putnam 2018-02-07 15:20:30 -08:00
parent 7c06ed77c4
commit 3635fe95f0
No known key found for this signature in database
GPG Key ID: 3FB595AA224A7751
2 changed files with 4 additions and 4 deletions

View File

@ -14,9 +14,9 @@ module PuppetStrings
# @option options [Boolean] :debug Enable YARD debug output. # @option options [Boolean] :debug Enable YARD debug output.
# @option options [Boolean] :backtrace Enable YARD backtraces. # @option options [Boolean] :backtrace Enable YARD backtraces.
# @option options [String] :markup The YARD markup format to use (defaults to 'markdown'). # @option options [String] :markup The YARD markup format to use (defaults to 'markdown').
# @option options [String] :format Specify output format (markdown or json)
# @option options [String] :path Write the selected format to a file path # @option options [String] :path Write the selected format to a file path
# @option options [Boolean] :stdout Use this switch to pipe the selected format to STDOUT # @option options [Boolean] :markdown From the --format option, is the format Markdown?
# @option options [Boolean] :json Is the format JSON?
# @option options [Array<String>] :yard_args The arguments to pass to yard. # @option options [Array<String>] :yard_args The arguments to pass to yard.
# @return [void] # @return [void]
def self.generate(search_patterns = DEFAULT_SEARCH_PATTERNS, options = {}) def self.generate(search_patterns = DEFAULT_SEARCH_PATTERNS, options = {})

View File

@ -111,9 +111,9 @@ Puppet::Face.define(:strings, '0.0.1') do
generate_options[:path] = options[:out] if options[:out] generate_options[:path] = options[:out] if options[:out]
generate_options[:stdout] = options[:stdout] generate_options[:stdout] = options[:stdout]
format = options[:format] || "" format = options[:format] || ""
if format.casecmp('markdown') == 0 if format.casecmp('markdown').zero?
generate_options[:markdown] = true generate_options[:markdown] = true
elsif format.casecmp('json') == 0 || options[:emit_json] || options[:emit_json_stdout] elsif format.casecmp('json').zero? || options[:emit_json] || options[:emit_json_stdout]
generate_options[:json] = true generate_options[:json] = true
end end
end end