Class: MRuby::CLI::Rake
- Inherits:
-
Object
- Object
- MRuby::CLI::Rake
- Defined in:
- lib/mruby/cli/rake.rb
Class Method Summary collapse
-
.[](options) ⇒ Object
Alias to exec a rake process.
Instance Method Summary collapse
- #arguments ⇒ Object
- #command ⇒ Object
- #environment ⇒ Object
- #exec ⇒ Object
-
#initialize(options) ⇒ Rake
constructor
A new instance of Rake.
Constructor Details
#initialize(options) ⇒ Rake
Returns a new instance of Rake.
4 5 6 |
# File 'lib/mruby/cli/rake.rb', line 4 def initialize() = end |
Class Method Details
.[](options) ⇒ Object
Alias to exec a rake process
28 29 30 |
# File 'lib/mruby/cli/rake.rb', line 28 def []() self.new().exec end |
Instance Method Details
#arguments ⇒ Object
16 17 18 |
# File 'lib/mruby/cli/rake.rb', line 16 def arguments Array([:args]) end |
#command ⇒ Object
12 13 14 |
# File 'lib/mruby/cli/rake.rb', line 12 def command Source.path.join('minirake').to_s end |
#environment ⇒ Object
8 9 10 |
# File 'lib/mruby/cli/rake.rb', line 8 def environment .fetch(:env,{}) end |
#exec ⇒ Object
20 21 22 23 24 |
# File 'lib/mruby/cli/rake.rb', line 20 def exec args = [self.environment,self.command,*self.arguments] puts args.inspect Kernel.exec(*args) end |