Sha256: 60c191923876d3e365b870cd3b69e851033733fdb07b0734f841ae47ccaba8a7
Contents?: true
Size: 748 Bytes
Versions: 3
Compression:
Stored size: 748 Bytes
Contents
require 'appraisal/appraisal' require 'appraisal/gemfile' module Appraisal # Loads and parses Appraisal files class File attr_reader :appraisals, :gemfile def self.each(&block) new.each(&block) end def initialize @appraisals = [] @gemfile = Gemfile.new @gemfile.load('Gemfile') run(IO.read(path)) if ::File.exists?(path) end def each(&block) appraisals.each(&block) end def appraise(name, &block) appraisal = Appraisal.new(name, gemfile) appraisal.instance_eval(&block) @appraisals << appraisal end private def run(definitions) instance_eval definitions, __FILE__, __LINE__ end def path 'Appraisals' end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
appraisal-0.4.0 | lib/appraisal/file.rb |
appraisal-0.3.8 | lib/appraisal/file.rb |
appraisal-0.3.7 | lib/appraisal/file.rb |