Class: Podrb::Commands::Podcasts::Output
- Inherits:
-
BaseOutput
- Object
- BaseOutput
- Podrb::Commands::Podcasts::Output
- Defined in:
- lib/podrb/commands/podcasts/output.rb
Instance Method Summary collapse
Methods inherited from BaseOutput
Constructor Details
This class inherits a constructor from Podrb::Commands::BaseOutput
Instance Method Details
#call ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/podrb/commands/podcasts/output.rb', line 7 def call case @context[:details] when :records_found text_table = generate_text_table( data: @context[:metadata][:records], columns: @context[:metadata][:columns] ) " \#{text_table}\n OUTPUT\n when :empty_table\n <<~OUTPUT\n No podcasts yet.\n OUTPUT\n when :invalid_column\n <<~OUTPUT\n This field is invalid: \#{@context[:metadata][:invalid_column]}\n OUTPUT\n end\nend\n" |