Class: SakaiInfo::CLI::Help

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

Constant Summary collapse

STRINGS =
{
  :default => <<EOF,

  "options" => <<EOF,

  "help" => <<EOF,

  "version" => <<EOF,

  "test" => <<EOF,

  "user" => <<EOF,

  "group" => <<EOF,

  "site" => <<EOF,

  "page" => <<EOF,

  "tool" => <<EOF,

  "pending-quiz" => <<EOF,

  "published-quiz" => <<EOF,

  "pending-quiz-section" => <<EOF,

  "published-quiz-section" => <<EOF,

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

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

  "pending-quiz-access-control" => <<EOF,

  "published-quiz-access-control" => <<EOF,

  "question-pool" => <<EOF,

  "quiz-attempt" => <<EOF,


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

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

  "assignment" => <<EOF,

  "assignment-submission" => <<EOF,

  "forum" => <<EOF,

  "forum-thread" => <<EOF,

  "forum-post" => <<EOF,

  "content" => <<EOF,
  "deleted-content-resource" => <<EOF,
  "announcement" => <<EOF,
  "announcement-channel" => <<EOF,
  "gradebook" => <<EOF,
  "gradebook-item" => <<EOF,
  "role" => <<EOF,
  "function" => <<EOF,
  "realm" => <<EOF,
  "private-message" => <<EOF,
  "alias" => <<EOF,
  "metaobj" => <<EOF,
  "wiki-page" => <<EOF,
  "wiki-page-history" => <<EOF,
  "query" => <<EOF,
}

Class Method Summary collapse

Class Method Details

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



530
531
532
533
534
535
536
537
538
539
540
# File 'lib/sakai-info/cli/help.rb', line 530

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