lib/asciidoctor/cli/invoker.rb in asciidoctor-1.5.4 vs lib/asciidoctor/cli/invoker.rb in asciidoctor-1.5.5

- old
+ new

@@ -11,15 +11,16 @@ @documents = [] @out = nil @err = nil @code = 0 options = options.flatten - if (first_option = options[0]).is_a?(Cli::Options) + case (first_option = options[0]) + when Options @options = first_option - elsif first_option.is_a?(::Hash) - @options = Cli::Options.new(options) + when ::Hash + @options = Options.new options else - if (result = Cli::Options.parse! options).is_a? ::Integer + if ::Integer === (result = Options.parse! options) @code = result @options = nil else @options = result end