Class: ThreeScaleToolbox::CLI::PrinterTransformer
- Inherits:
-
Object
- Object
- ThreeScaleToolbox::CLI::PrinterTransformer
- Defined in:
- lib/3scale_toolbox/cli/output_flag.rb
Instance Method Summary collapse
Instance Method Details
#call(output_format) ⇒ Object
4 5 6 7 8 9 10 11 12 13 |
# File 'lib/3scale_toolbox/cli/output_flag.rb', line 4 def call(output_format) raise unless %w[yaml json].include?(output_format) case output_format when 'yaml' YamlPrinter.new when 'json' JsonPrinter.new end end |