Class: PactBroker::Client::Versions::Formatter
- Inherits:
-
Object
- Object
- PactBroker::Client::Versions::Formatter
- Defined in:
- lib/pact_broker/client/versions/formatter.rb
Class Method Summary collapse
Class Method Details
.call(matrix_lines, format) ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'lib/pact_broker/client/versions/formatter.rb', line 10 def self.call(matrix_lines, format) formatter = case format when 'json' then JsonFormatter when 'table' then TextFormatter else raise PactBroker::Client::Error.new("Invalid output option '#{format}. Must be one of 'table' or 'json'.") end formatter.call(matrix_lines) end |