Module: Bundler::RubyDsl
Relationships & Source Files | |
Extension / Inclusion / Inheritance Descendants | |
Included In:
| |
Defined in: | lib/bundler/ruby_dsl.rb |
Instance Method Summary
Instance Method Details
#ruby(*ruby_version)
# File 'lib/bundler/ruby_dsl.rb', line 5
def ruby(*ruby_version) = ruby_version.last.is_a?(Hash) ? ruby_version.pop : {} ruby_version.flatten! raise GemfileError, "Please define :engine_version" if [:engine] && [:engine_version].nil? raise GemfileError, "Please define :engine" if [:engine_version] && [:engine].nil? if [:file] raise GemfileError, "Cannot specify version when using the file option" if ruby_version.any? ruby_version << Bundler.read_file( [:file]).strip end if [:engine] == "ruby" && [:engine_version] && ruby_version != Array( [:engine_version]) raise GemfileEvalError, "ruby_version must match the :engine_version for MRI" end @ruby_version = RubyVersion.new(ruby_version, [:patchlevel], [:engine], [:engine_version]) end