Class: Appraisal::Gemfile

Inherits:
BundlerDSL show all
Defined in:
lib/appraisal/gemfile.rb

Overview

Load bundler Gemfiles and merge dependencies

Constant Summary

Constants inherited from BundlerDSL

BundlerDSL::PARTS

Instance Attribute Summary

Attributes inherited from BundlerDSL

#dependencies

Instance Method Summary collapse

Methods inherited from BundlerDSL

#for_dup, #gem, #gemspec, #git, #group, #initialize, #path, #platforms, #ruby, #source, #to_s

Constructor Details

This class inherits a constructor from Appraisal::BundlerDSL

Instance Method Details

#dupObject



20
21
22
23
24
# File 'lib/appraisal/gemfile.rb', line 20

def dup
  Gemfile.new.tap do |gemfile|
    gemfile.run(for_dup)
  end
end

#load(path) ⇒ Object



12
13
14
# File 'lib/appraisal/gemfile.rb', line 12

def load(path)
  run(IO.read(path))
end

#run(definitions) ⇒ Object



16
17
18
# File 'lib/appraisal/gemfile.rb', line 16

def run(definitions)
  instance_eval(definitions, __FILE__, __LINE__) if definitions
end