Sha256: 95c35c1d415fc346474851047bc6b81805d9d7f3742738730b346a2d0913296f

Contents?: true

Size: 481 Bytes

Versions: 1

Compression:

Stored size: 481 Bytes

Contents

module Penchant
  class DotPenchant
    class << self
      def run(env = nil)
        dot_penchant = new
        dot_penchant.run(env)
        dot_penchant
      end
    end

    def run(env = nil)
      instance_eval(File.read('.penchant'))
    end

    def rake(*tasks)
      command = [ "rake", *tasks ]
      command.unshift("bundle exec") if gemfile?
      Kernel.system command.join(' ')
    end

    private
    def gemfile?
      File.file?('Gemfile')
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
penchant-0.0.3 lib/penchant/dot_penchant.rb