Class: ConfigDelete

Inherits:
Command show all
Defined in:
lib/clui_config.rb

Instance Attribute Summary

Attributes inherited from Command

#desc, #name

Instance Method Summary collapse

Methods inherited from Command

#add_arg, #add_cmd, #add_flow, #add_flow_from_usage, #add_input, #add_option, #add_options, #command_name?, #get_args_used, #init, #initialize, #run, #show_help, #show_help_option

Constructor Details

This class inherits a constructor from Command

Instance Method Details

#create_args ⇒ Object



49
50
51
# File 'lib/clui_config.rb', line 49

def create_args
  add_arg("param", "name of configuration parameter",  /[-a-zA-Z]+/)
end

#create_flows ⇒ Object



53
54
55
# File 'lib/clui_config.rb', line 53

def create_flows
  add_flow_from_usage("<param>")
end

#execute(args, ignore) ⇒ Object



57
58
59
60
# File 'lib/clui_config.rb', line 57

def execute(args, ignore)
  handler = ConfigHandler.new
  handler.delete(args["param"])
end