class Nova::CLI
Handles the command line interface. Uses thor to do that.
Public Class Methods
source_root()
click to toggle source
The source thor should use for managing files.
@api private @return [String]
# File lib/nova/cli.rb, line 15 def self.source_root File.absolute_path("../../generator/template", __FILE__) end
Public Instance Methods
install(to)
click to toggle source
Installs a galaxy into the given path. Just copies the files and folders in lib/generator/template/new_install into the given folder.
@return [void]
# File lib/nova/cli.rb, line 25 def install(to) directory("new_install", to) end
list()
click to toggle source
Lists all of the stars that the project has available to it. Requires the –path parameter or to be in a project folder.
@return [void]
# 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
Private Instance Methods
project()
click to toggle source
Returns the project instance for the folder.
@see Project
@return [Project]
# File lib/nova/cli.rb, line 55 def project @_project ||= Project.new(options[:path]) end