Class: Klipbook::Commands::List
- Defined in:
- lib/klipbook/commands/list.rb
Instance Method Summary collapse
Methods inherited from Command
Constructor Details
This class inherits a constructor from Klipbook::Commands::Command
Instance Method Details
#run_command!(book_source, _options) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/klipbook/commands/list.rb', line 4 def run_command!(book_source, ) books = book_source.books if books.empty? logger.info 'No books available' else logger.info 'Book list:' books.each_with_index do |book, index| logger.info "[#{index + 1}] #{book.}" end end end |