Class: S7n::S7nCli::SaveCommand
- Defined in:
- lib/s7n/s7ncli/command.rb
Overview
現在の状態を保存するコマンドを表現する。
Instance Attribute Summary
Attributes inherited from Command
Instance Method Summary collapse
-
#initialize(*args) ⇒ SaveCommand
constructor
A new instance of SaveCommand.
- #run(argv) ⇒ Object
Methods inherited from Command
#aliases, create_instance, #description, #help, #name, #option_parser, split_name_and_argv, #usage
Constructor Details
#initialize(*args) ⇒ SaveCommand
Returns a new instance of SaveCommand.
155 156 157 158 |
# File 'lib/s7n/s7ncli/command.rb', line 155 def initialize(*args) super @options.push(BoolOption.new("f", "force", _("Force."))) end |
Instance Method Details
#run(argv) ⇒ Object
160 161 162 163 164 165 |
# File 'lib/s7n/s7ncli/command.rb', line 160 def run(argv) option_parser.parse!(argv) world.save(config["force"]) puts(_("Saved.")) return true end |