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?, #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
64
65
66
67
|
# File 'lib/clui_config.rb', line 64
def create_args
add_arg("param", "name of configuration parameter", /[-a-zA-Z]+/)
add_arg("value", "value of configuration parameter", /.*/)
end
|
#create_flows ⇒ Object
69
70
71
|
# File 'lib/clui_config.rb', line 69
def create_flows
add_flow_from_usage("<param> <value>")
end
|
#execute(args, ignore) ⇒ Object
73
74
75
76
|
# File 'lib/clui_config.rb', line 73
def execute(args, ignore)
handler = ConfigHandler.new
handler.set(args["param"], args["value"])
end
|