Class: ThreeScaleToolbox::Commands::PoliciesCommand::ExportSubcommand::SerializerTransformer
- Inherits:
-
Object
- Object
- ThreeScaleToolbox::Commands::PoliciesCommand::ExportSubcommand::SerializerTransformer
- Defined in:
- lib/3scale_toolbox/commands/policies_command/export_command.rb
Instance Method Summary collapse
Instance Method Details
#call(output_format) ⇒ Object
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/3scale_toolbox/commands/policies_command/export_command.rb', line 20 def call(output_format) raise unless %w[yaml json].include?(output_format) case output_format when 'yaml' YAMLSerializer.new when 'json' JSONSerializer.new end end |