Class: Nu::CLI

Inherits:
Thor
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/nu/cli.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeCLI

Returns a new instance of CLI.



9
10
11
12
13
# File 'lib/nu/cli.rb', line 9

def initialize(*)
  super
  
  @proj = Nu::Project.new
end

Class Method Details

.source_rootObject



44
45
46
# File 'lib/nu/cli.rb', line 44

def self.source_root
  File.dirname(__FILE__)
end

Instance Method Details

#install(*names) ⇒ Object



18
19
20
21
22
23
24
25
26
27
# File 'lib/nu/cli.rb', line 18

def install(*names)
  
      loc = @proj.location
      cl = options['location']
      loc = cl unless cl.nil?
    
    names.each do |n|
      Nu::Loader.load n, loc
    end
end

#lib(folder) ⇒ Object



30
31
32
# File 'lib/nu/cli.rb', line 30

def lib(folder)
  @proj.location= folder
end

#uselongnamesObject



35
36
37
# File 'lib/nu/cli.rb', line 35

def uselongnames
  @proj.use_long_names
end

#useshortnamesObject



40
41
42
# File 'lib/nu/cli.rb', line 40

def useshortnames
  @proj.use_short_names
end