Class: Nova::CLI
Overview
Handles the command line interface. Uses thor to do that.
Class Method Summary collapse
-
.source_root ⇒ String
private
The source thor should use for managing files.
Instance Method Summary collapse
-
#install(to) ⇒ void
Installs a galaxy into the given path.
-
#list ⇒ void
Lists all of the stars that the project has available to it.
Class Method Details
.source_root ⇒ String
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
The source thor should use for managing files.
15 16 17 |
# File 'lib/nova/cli.rb', line 15 def self.source_root File.absolute_path("../../generator/template", __FILE__) end |
Instance Method Details
#install(to) ⇒ void
This method returns an undefined value.
Installs a galaxy into the given path. Just copies the files and folders in lib/generator/template/new_install into the given folder.
25 26 27 |
# File 'lib/nova/cli.rb', line 25 def install(to) directory("new_install", to) end |
#list ⇒ void
This method returns an undefined value.
Lists all of the stars that the project has available to it. Requires the –path parameter or to be in a project folder.
34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/nova/cli.rb', line 34 def list project.require_files Star.stars.each do |key, value| shell.say("#{key}:", :green, :bold) value.each do |k, v| shell.say "\t#{k}" end end end |