Class: Nauvisian::CLI::Commands::Mod::Versions

Inherits:
Dry::CLI::Command
  • Object
show all
Includes:
MessageHelper
Defined in:
lib/nauvisian/cli/commands/mod/versions.rb

Instance Method Summary collapse

Instance Method Details

#call(mod:) ⇒ Object



15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/nauvisian/cli/commands/mod/versions.rb', line 15

def call(mod:, **)
  api = Nauvisian::API.new
  mod = Nauvisian::Mod[name: mod]
  releases = api.releases(mod).sort_by(&:released_at)

  releases.each do |release|
    puts release.version
  end
rescue => e
  message(e)
  exit 1
end