Class: Appraisal::Gemfile
- Inherits:
-
BundlerDSL
- Object
- BundlerDSL
- Appraisal::Gemfile
- Defined in:
- lib/appraisal/gemfile.rb
Overview
Load bundler Gemfiles and merge dependencies
Constant Summary
Constants inherited from BundlerDSL
Instance Attribute Summary
Attributes inherited from BundlerDSL
Instance Method Summary collapse
Methods inherited from BundlerDSL
#for_dup, #gem, #gemspec, #git, #git_source, #group, #initialize, #install_if, #path, #platforms, #remove_gem, #ruby, #source, #to_s
Constructor Details
This class inherits a constructor from Appraisal::BundlerDSL
Instance Method Details
#dup ⇒ Object
24 25 26 27 28 29 |
# File 'lib/appraisal/gemfile.rb', line 24 def dup Gemfile.new.tap do |gemfile| gemfile.git_sources = @git_sources gemfile.run(for_dup, __FILE__, __LINE__) end end |
#load(path) ⇒ Object
16 17 18 |
# File 'lib/appraisal/gemfile.rb', line 16 def load(path) run(IO.read(path), path) if File.exist?(path) end |
#run(definitions, path, line = 1) ⇒ Object
20 21 22 |
# File 'lib/appraisal/gemfile.rb', line 20 def run(definitions, path, line = 1) instance_eval(definitions, path, line) if definitions end |