Class: MRuby::CLI::App
- Inherits:
-
Thor
- Object
- Thor
- MRuby::CLI::App
- Defined in:
- lib/mruby/cli/app.rb
Instance Method Summary collapse
- #build ⇒ Object
- #help ⇒ Object
- #minirake(*args) ⇒ Object
- #rake(command = nil) ⇒ Object
- #test ⇒ Object
Instance Method Details
#build ⇒ Object
39 40 41 |
# File 'lib/mruby/cli/app.rb', line 39 def build rake('all') end |
#help ⇒ Object
48 49 50 51 |
# File 'lib/mruby/cli/app.rb', line 48 def help Description.print(shell) super end |
#minirake(*args) ⇒ Object
20 21 22 |
# File 'lib/mruby/cli/app.rb', line 20 def minirake(*args) Rake[args: args] end |
#rake(command = nil) ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/mruby/cli/app.rb', line 25 def rake(command=nil) Rake[{ args: [ '--rakefile', Source.path.join('Rakefile').to_s ] + Array(command), env: { 'MRUBY_CONFIG' => [:build_config], 'MRUBY_BUILD_DIR' => [:build_dir] } }] end |
#test ⇒ Object
44 45 46 |
# File 'lib/mruby/cli/app.rb', line 44 def test rake('test') end |