Class: Nauvisian::CLI::Commands::Mod::Settings::Dump

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

Instance Method Summary collapse

Instance Method Details

#call(**options) ⇒ Object



16
17
18
19
20
21
22
23
24
# File 'lib/nauvisian/cli/commands/mod/settings/dump.rb', line 16

def call(**options)
  mod_directory = Pathname(options[:mod_directory])
  mod_settings_path = mod_directory / "mod-settings.dat"
  settings = Nauvisian::ModSettings.load(mod_settings_path)
  puts settings.to_json
rescue => e
  message(e)
  exit 1
end