Class: MRuby::CLI::App

Inherits:
Thor
  • Object
show all
Defined in:
lib/mruby/cli/app.rb

Instance Method Summary collapse

Instance Method Details

#buildObject



41
42
43
# File 'lib/mruby/cli/app.rb', line 41

def build
  rake('all')
end

#help(*args) ⇒ Object



50
51
52
53
# File 'lib/mruby/cli/app.rb', line 50

def help(*args)
  Description.print(shell)
  super
end

#minirake(*args) ⇒ Object



22
23
24
# File 'lib/mruby/cli/app.rb', line 22

def minirake(*args)
  Rake[args: args]
end

#rake(command = nil) ⇒ Object



27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/mruby/cli/app.rb', line 27

def rake(command=nil)
  Rake[{
    args: [
      '--rakefile',
      Source.path.join('Rakefile').to_s
    ] + Array(command),
    env: {
      'MRUBY_CONFIG' => options[:build_config],
      'MRUBY_BUILD_DIR' => options[:build_dir]
    }
  }]
end

#testObject



46
47
48
# File 'lib/mruby/cli/app.rb', line 46

def test
  rake('test')
end