- Defined in:
.require(*groups) ⇒ Object
Setups Bundler environment (see Bundler.setup) if it is not already set, and loads all gems from groups specified. Unlike ::setup, can be called multiple times with different groups (if they were allowed by setup).
gem 'first_gem', '= 1.0' group :test do gem 'second_gem', '= 1.0' end
The code will work as follows:
. # allow all groups .require(:default) # requires only first_gem # ...later .require(:test) # requires second_gem
174 175 176
# File 'lib/bundler.rb', line 174 def require(*groups) setup(*groups).require(*groups) end