lib/cli_format/presenter.rb in cli-format-0.2.1 vs lib/cli_format/presenter.rb in cli-format-0.2.2

- old
+ new

@@ -5,16 +5,16 @@ @options = options @rows = [] end def show - presenter_class = "CliFormat::Presenter::#{format.classify}".constantize + presenter_class = "CliFormat::Presenter::#{format.camelize}".constantize presenter = presenter_class.new(@options, @header, @rows) presenter.show end # Formats: tabs, markdown, json, csv, table, etc def format - @options[:format] || ENV['CLI_FORMAT'] || "table" + @options[:format] || ENV['CLI_FORMAT'] || CliFormat.default_format # table end end end