mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Simplify RailsGuides::Generator#select_only
a bit
The main goal is to improve readability, but as a side effect this commit makes the method a bit faster.
This commit is contained in:
parent
4547e894e9
commit
35442422fa
1 changed files with 1 additions and 1 deletions
|
@ -162,7 +162,7 @@ module RailsGuides
|
|||
def select_only(guides)
|
||||
prefixes = ENV['ONLY'].split(",").map(&:strip)
|
||||
guides.select do |guide|
|
||||
prefixes.any? { |p| guide.start_with?(p) || guide.start_with?("kindle") }
|
||||
guide.start_with?('kindle'.freeze, *prefixes)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue