Method: Gem::RequestSet::GemDependencyAPI#group

Defined in:
lib/rubygems/request_set/gem_dependency_api.rb

#group(*groups) ⇒ Object

:category: Gem Dependencies DSL

Block form for placing a dependency in the given groups.

group :development do
  gem 'debugger'
end

group :development, :test do
  gem 'minitest'
end

Groups can be excluded at install time using `gem install -g –without development`. See `gem help install` and `gem help gem_dependencies` for further details.


684
685
686
687
688
689
690
691
# File 'lib/rubygems/request_set/gem_dependency_api.rb', line 684

def group(*groups)
  @current_groups = groups

  yield

ensure
  @current_groups = nil
end