Class: Gloo::Verbs::Help

Inherits:
Core::Verb show all
Defined in:
lib/gloo/verbs/help.rb

Constant Summary collapse

KEYWORD =
'help'.freeze
KEYWORD_SHORT =
'?'.freeze
"Entering the gloo help shell. Type 'quit' to exit.\n" \
"Try: verbs, objects, settings, extensions, libraries, docs, " \
"verb {name}, object {name}, doc {name}, library {name}, extension {name}\n".freeze

Constants inherited from Core::Baseo

Core::Baseo::NOT_IMPLEMENTED_ERR

Instance Attribute Summary

Attributes inherited from Core::Verb

#params, #tokens

Attributes inherited from Core::Baseo

#name

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Core::Verb

#display_value, help, inherited, #initialize, #type_display

Methods inherited from Core::Baseo

#initialize, #type_display

Constructor Details

This class inherits a constructor from Gloo::Core::Verb

Class Method Details

.doc_dataObject

Get the verb's documentation data.



48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# File 'lib/gloo/verbs/help.rb', line 48

def self.doc_data
  {
    :name => KEYWORD,
    :shortcut => KEYWORD_SHORT,
    :description => 'Enter the interactive help shell. From there, ' \
      'look up verbs, object types, settings, extensions, libraries, ' \
      'and narrative doc pages, or get detailed help for a specific ' \
      'verb, object, doc page, loaded library, or loaded extension.',
    :syntax => [ 'help' ],
    :result => "Enters the help shell, prompt \"help> \". Commands: " \
      'verbs, objects, settings, extensions, libraries, docs (lists), ' \
      'verb {name}, object {name}, doc {name}, library {name}, ' \
      'extension {name} (detail for one, tab-completable — library ' \
      '{name} / extension {name} show the README for a loaded core ' \
      "library / user extension). Type 'quit' to leave the shell.",
    :examples => <<~EXAMPLES.strip
      > help
      help> verbs
      help> verb put
      help> object container
      help> docs
      help> doc getting_started
      help> library db
      help> extension alert
      help> quit
    EXAMPLES
  }
end

.keywordObject

Get the Verb's keyword.



30
31
32
# File 'lib/gloo/verbs/help.rb', line 30

def self.keyword
  return KEYWORD
end

.keyword_shortcutObject

Get the Verb's keyword shortcut.



37
38
39
# File 'lib/gloo/verbs/help.rb', line 37

def self.keyword_shortcut
  return KEYWORD_SHORT
end

Instance Method Details

#runObject

Run the verb. Takes no arguments - always enters the interactive help shell.



22
23
24
25
# File 'lib/gloo/verbs/help.rb', line 22

def run
  @engine.log.show BANNER
  build_shell.start
end