Method: VMC::Cli::Command::Micro#override

Defined in:
lib/cli/commands/micro.rb

#override(config, option, escape = false, &blk) ⇒ Object

override with command line arguments and yield the block in case the option isn’t set



84
85
86
87
88
89
90
91
# File 'lib/cli/commands/micro.rb', line 84

def override(config, option, escape=false, &blk)
  # override if given on the command line

  if opt = @options[option.to_sym]
    opt = VMC::Micro.escape_path(opt) if escape
    config[option] = opt
  end
  config[option] = yield unless config[option]
end