Class: SakaiInfo::CLI::Help

Inherits:
Object
  • Object
show all
Defined in:
lib/sakai-info/cli/help.rb

Constant Summary collapse

STRINGS =
{
  :default => <<EOF,

  "help" => <<EOF,

  "version" => <<EOF,

  "test" => <<EOF,

  "user" => <<EOF,

  "group" => <<EOF,

  "site" => <<EOF,

  "page" => <<EOF,

  "tool" => <<EOF,

  "quiz" => <<EOF,

  "quiz-section" => <<EOF,

  "quiz-item" => <<EOF,

  "question-pool" => <<EOF,

  "quiz-attempt" => <<EOF,


  "quiz-attempt-item" => <<EOF,

  "quiz-attempt-item-attachment" => <<EOF,

  "assignment" => <<EOF,

  "assignment-submission" => <<EOF,
}

Class Method Summary collapse

Class Method Details

.help(topic = :default, io = STDOUT) ⇒ Object



297
298
299
300
301
302
303
304
305
306
307
# File 'lib/sakai-info/cli/help.rb', line 297

def self.help(topic = :default, io = STDOUT)
  topic ||= :default
  if STRINGS.has_key? topic
    io.puts STRINGS[topic]
  else
    STDERR.puts "ERROR: help topic '#{topic}' was unrecognized"
    STDERR.puts
    CLI::Help.help(:default, STDERR)
    exit 1
  end
end