Class: CmdSave

Inherits:
CmdBase show all
Defined in:
lib/shell.rb

Overview

Command save

Constant Summary collapse

NAME =
'save'
ALIASES =
['s'].freeze
ARGUMENTS =
[].freeze
DESCRIPTION =
'Save levels information'

Instance Method Summary collapse

Methods inherited from CmdBase

#aliases, #arguments, #description, #initialize, #name

Constructor Details

This class inherits a constructor from CmdBase

Instance Method Details

#exec(_) ⇒ Object



217
218
219
220
# File 'lib/shell.rb', line 217

def exec(_)
  File.write(@shell.class::CONFIG_FILE, @shell.natas.to_yaml)
  puts @shell.console.yellow("Information has been saved to #{@shell.class::CONFIG_FILE}")
end