class MyManga::CLI::Commands::Find
See desc
Public Instance Methods
call(search_term:)
click to toggle source
# File lib/my_manga/find.rb, line 11 def call(search_term:) results = MyManga.find(search_term) puts "Manga found for \"#{search_term}\"" puts '=' * (18 + search_term.length) return if results.empty? column_width = results.map { |r| r.name.length }.max puts pad('Name', column_width) + 'Url' results.each do |result| puts pad(result.name, column_width) + result.uri end end