From 3635fe95f08d24006b475066e297f32d30c1f27e Mon Sep 17 00:00:00 2001 From: Eric Putnam Date: Wed, 7 Feb 2018 15:20:30 -0800 Subject: [PATCH] rubocop sucks --- lib/puppet-strings.rb | 4 ++-- lib/puppet/face/strings.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/puppet-strings.rb b/lib/puppet-strings.rb index 75567f9..1e0bfe7 100644 --- a/lib/puppet-strings.rb +++ b/lib/puppet-strings.rb @@ -14,9 +14,9 @@ module PuppetStrings # @option options [Boolean] :debug Enable YARD debug output. # @option options [Boolean] :backtrace Enable YARD backtraces. # @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 [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] :yard_args The arguments to pass to yard. # @return [void] def self.generate(search_patterns = DEFAULT_SEARCH_PATTERNS, options = {}) diff --git a/lib/puppet/face/strings.rb b/lib/puppet/face/strings.rb index d86e895..578b681 100644 --- a/lib/puppet/face/strings.rb +++ b/lib/puppet/face/strings.rb @@ -111,9 +111,9 @@ Puppet::Face.define(:strings, '0.0.1') do generate_options[:path] = options[:out] if options[:out] generate_options[:stdout] = options[:stdout] format = options[:format] || "" - if format.casecmp('markdown') == 0 + if format.casecmp('markdown').zero? 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 end end