gem_group(*names, &block)
public
Wraps gem entries inside
a group.
gem_group :development, :test do
gem "rspec-rails"
end
# File railties/lib/rails/generators/actions.rb, line 111
def gem_group(*names, &block)
options = names.extract_options!
str = names.map(&:inspect)
str << quote(options) unless options.empty?
str = str.join(", ")
log :gemfile, "group #{str}"
in_root do
append_file_with_newline "Gemfile", "\ngroup #{str} do", force: true
with_indentation(&block)
append_file_with_newline "Gemfile", "end", force: true
end
end