Module: Rbnotes::Commands::Builtins
- Defined in:
- lib/rbnotes/commands.rb
Overview
Built-in commands:
-
repo: prints the absolute path of the repository.
-
conf: prints all of the current configuration settings.
-
stamp: converts given TIME_STR into a timestamp.
-
time: converts given STAMP into a time string.
Defined Under Namespace
Classes: Conf, Repo, Stamp, Time, Usage, Version
Class Method Summary collapse
Class Method Details
.command(name) ⇒ Object
240 241 242 243 244 245 246 |
# File 'lib/rbnotes/commands.rb', line 240 def command(name) begin const_defined?(name, false) ? const_get(name, false) : nil rescue NameError => _ nil end end |
.default_cmd ⇒ Object
236 237 238 |
# File 'lib/rbnotes/commands.rb', line 236 def default_cmd Usage end |
.default_cmd_name ⇒ Object
232 233 234 |
# File 'lib/rbnotes/commands.rb', line 232 def default_cmd_name "usage" end |