Class: ConfigGet

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



34
35
36
# File 'lib/clui_config.rb', line 34

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

#create_flows ⇒ Object



38
39
40
# File 'lib/clui_config.rb', line 38

def create_flows
  add_flow_from_usage("<param>")
end

#execute(args, ignore) ⇒ Object



42
43
44
45
# File 'lib/clui_config.rb', line 42

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