Class: Nu::CLI
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ CLI
constructor
A new instance of CLI.
- #install(*names) ⇒ Object
- #lib(folder) ⇒ Object
- #uselongnames ⇒ Object
- #useshortnames ⇒ Object
Constructor Details
#initialize ⇒ CLI
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_root ⇒ Object
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 = ['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 |
#uselongnames ⇒ Object
35 36 37 |
# File 'lib/nu/cli.rb', line 35 def uselongnames @proj.use_long_names end |
#useshortnames ⇒ Object
40 41 42 |
# File 'lib/nu/cli.rb', line 40 def useshortnames @proj.use_short_names end |