Sha256: 1798f56d376c3f46106defdae6c87128426c581587f8a5994a952f59d025fb35

Contents?: true

Size: 947 Bytes

Versions: 2

Compression:

Stored size: 947 Bytes

Contents

require 'ruby_leiningen/version'
require 'ruby_leiningen/commands'

module RubyLeiningen
  class << self
    attr_accessor :configuration

    def configure
      @configuration ||= Configuration.new
      yield(@configuration)
    end

    def reset!
      @configuration = nil
    end
  end

  module ClassMethods
    def version
      Commands::Version.new.execute
    end

    def check(opts = {})
      Commands::Check.new.execute(opts)
    end

    def clean(opts = {})
      Commands::Clean.new.execute(opts)
    end

    def deps(opts = {})
      Commands::Deps.new.execute(opts)
    end

    def run(opts = {})
      Commands::Run.new.execute(opts)
    end

    def uberjar(opts = {})
      Commands::Uberjar.new.execute(opts)
    end
  end
  extend ClassMethods

  def self.included(other)
    other.extend(ClassMethods)
  end

  class Configuration
    attr_accessor :binary

    def initialize
      @binary = 'lein'
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ruby_leiningen-0.3.0 lib/ruby_leiningen.rb
ruby_leiningen-0.2.0.pre.2 lib/ruby_leiningen.rb