Sha256: a8a8fefcb65784512ddeb393be846d9782579be3b34d837c92a1b6cfcbf0474d

Contents?: true

Size: 543 Bytes

Versions: 2

Compression:

Stored size: 543 Bytes

Contents

module MRuby::CLI
  class Rake

    def initialize(options)
      @options = options
    end

    def environment
      @options.fetch(:env,{})
    end

    def command
      Source.path.join('minirake').to_s
    end

    def arguments
      Array(@options[:args])
    end

    def exec
      args = [self.environment,self.command,*self.arguments]
      puts args.inspect
      Kernel.exec(*args)
    end

    class << self
      # Alias to exec a rake process
      def [](options)
        self.new(options).exec
      end
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mruby-cli-0.2.0 lib/mruby/cli/rake.rb
mruby-cli-0.1.2 lib/mruby/cli/rake.rb