File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,9 +14,9 @@ module PuppetStrings
1414 # @option options [Boolean] :debug Enable YARD debug output.
1515 # @option options [Boolean] :backtrace Enable YARD backtraces.
1616 # @option options [String] :markup The YARD markup format to use (defaults to 'markdown').
17- # @option options [String] :format Specify output format (markdown or json)
1817 # @option options [String] :path Write the selected format to a file path
19- # @option options [Boolean] :stdout Use this switch to pipe the selected format to STDOUT
18+ # @option options [Boolean] :markdown From the --format option, is the format Markdown?
19+ # @option options [Boolean] :json Is the format JSON?
2020 # @option options [Array<String>] :yard_args The arguments to pass to yard.
2121 # @return [void]
2222 def self . generate ( search_patterns = DEFAULT_SEARCH_PATTERNS , options = { } )
Original file line number Diff line number Diff line change @@ -111,9 +111,9 @@ def build_generate_options(options = nil, *yard_args)
111111 generate_options [ :path ] = options [ :out ] if options [ :out ]
112112 generate_options [ :stdout ] = options [ :stdout ]
113113 format = options [ :format ] || ""
114- if format . casecmp ( 'markdown' ) == 0
114+ if format . casecmp ( 'markdown' ) . zero?
115115 generate_options [ :markdown ] = true
116- elsif format . casecmp ( 'json' ) == 0 || options [ :emit_json ] || options [ :emit_json_stdout ]
116+ elsif format . casecmp ( 'json' ) . zero? || options [ :emit_json ] || options [ :emit_json_stdout ]
117117 generate_options [ :json ] = true
118118 end
119119 end
You can’t perform that action at this time.
0 commit comments