Class: ConfigSet
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?, #flow_passes_parse, #flow_passes_preconditions, #get_args_used, #init, #initialize, #option_help_string, #run, #show_help, #show_help_option
Constructor Details
This class inherits a constructor from Command
Instance Method Details
#create_args ⇒ Object
63
64
65
66
|
# File 'lib/clui_config.rb', line 63
def create_args
add_arg("param", "name of configuration parameter", /[-a-zA-Z]+/)
add_arg("value", "value of configuration parameter", /.*/)
end
|
#create_flows ⇒ Object
68
69
70
|
# File 'lib/clui_config.rb', line 68
def create_flows
add_flow_from_usage("<param> <value>")
end
|
#execute(args, ignore) ⇒ Object
72
73
74
75
|
# File 'lib/clui_config.rb', line 72
def execute(args, ignore)
handler = ConfigHandler.new
handler.set(args["param"], args["value"])
end
|