Class: SRS::CLI::Help

Inherits:
Object
  • Object
show all
Defined in:
lib/srs/cli/help.rb

Instance Method Summary collapse

Instance Method Details

#help ⇒ Object



20
21
# File 'lib/srs/cli/help.rb', line 20

def help()
end

#run!(arguments) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/srs/cli/help.rb', line 6

def run!(arguments)
	if arguments.empty?
		summary
	else
		command = SRS::CLI::cmd_to_symbol(arguments.first)
		if command
			SRS::CLI.const_get(command).new.help()
		else
			summary
		end
	end
	return 0
end

#summary ⇒ Object



23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/srs/cli/help.rb', line 23

def summary()
	puts "Usage: srs <command> [args]"
	puts
	puts "Available commands are:"
	puts "    init          Initialise an SRS workspace"
	puts "    insert-into   Insert data into the workspace"
	puts "    schedule      Schedule an exercise"
	puts "    do-exercise   Perform a rep on an exercise"
	puts "    reschedule    Update an exercise schedule based on score"
	puts "    queue         Queue due exercises"
	puts "    next-due      Retrieve the next due exercise from the queue"
	puts "    next-new      Retrieve the next available untested exercise"
	puts "    get-field     Retrieve a field by name from a schedule or exercise"
	puts "    cat           Output data contained within the workspace"
	puts
	puts "See 'srs help <command>' for more information on a specific command."
end