-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhelp.rb
More file actions
26 lines (19 loc) · 1007 Bytes
/
Copy pathhelp.rb
File metadata and controls
26 lines (19 loc) · 1007 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#Class Definitions
class Help
ALL_COMMANDS = {"load" => "loads a new file", "help" => "shows a list of available commands",
"queue count" => "total items in the queue", "queue clear" => "empties the queue",
"queue print" => "prints to the queue", "queue print by" => "prints the specified attribute",
"queue save to" => "exports queue to a CSV", "find" => "load the queue with matching records"}
def self.for(parameters)
if parameters.count == 0
puts "Please select a command from below:\n"
ALL_COMMANDS.each{|key, value| puts "#{key}"}
elsif parameters.count >= 1
ALL_COMMANDS.each{|key, value| puts "#{value}"} #ammend return to match input key
#something needs to go here to compare the input with the keys in ALL_COMMANDS
end
end
def self.valid_parameters_for_help?(parameters)
parameters.empty? || EventReporterCLI.valid_command?(parameters.join(" "))
end
end