Class: Gemview::Commands::Author

Inherits:
Dry::CLI::Command
  • Object
show all
Defined in:
lib/gemview/commands.rb

Instance Method Summary collapse

Instance Method Details

#call(username:) ⇒ Object



70
71
72
73
74
75
76
77
78
# File 'lib/gemview/commands.rb', line 70

def call(username:, **)
  gems = Gem.author(username: username)

  if gems.empty?
    abort("Error: No gems found for the rubygems.org username: #{username}")
  end

  View.list(gems: gems)
end