Class: Dothtml::CLI
- Inherits:
-
Object
- Object
- Dothtml::CLI
- Defined in:
- lib/dothtml/cli.rb
Constant Summary collapse
- VERSION_STRING =
"dothtml #{Dothtml::VERSION}"
- COMMANDS =
{ "build" => { "usage" => "build [dotfile]", "synopsis" => <<-EOS Builds the specified dotfile (or all .dot files, if not specified) into .svg and .html files. This is the default command if nothing is specified on the command line. EOS }, "create" => { "usage" => "create <dir>", "synopsis" => <<-EOS Generates a new Dothtml repo at the indicated dir. EOS }, "watch" => { "usage" => "watch", "synopsis" => <<-EOS Starts a guard process, which automatically does a build as .dot files are changed. EOS }, }
- COMMAND_NAMES =
COMMANDS.keys + %w(version help)
- DEFAULT_COMMAND =
"build"
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(args) ⇒ CLI
constructor
A new instance of CLI.
Constructor Details
#initialize(args) ⇒ CLI
Returns a new instance of CLI.
37 38 39 |
# File 'lib/dothtml/cli.rb', line 37 def initialize(args) @args = args end |
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args.
35 36 37 |
# File 'lib/dothtml/cli.rb', line 35 def args @args end |
Instance Method Details
#execute ⇒ Object
41 42 43 44 45 |
# File 'lib/dothtml/cli.rb', line 41 def execute execute_command end |