Skip to content

Commit

Permalink
Update the doc for Performance/FlatMap
Browse files Browse the repository at this point in the history
  • Loading branch information
richardstewart0213 committed Mar 23, 2021
1 parent 9b17953 commit 8ee8d3a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion docs/modules/ROOT/pages/cops_performance.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -915,7 +915,8 @@ waldo.size
| -
|===

This cop is used to identify usages of
This cop is used to identify usages of `map { ... }.flatten` and
change them to use `flat_map { ... }` instead.

=== Examples

Expand Down
3 changes: 2 additions & 1 deletion lib/rubocop/cop/performance/flat_map.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
module RuboCop
module Cop
module Performance
# This cop is used to identify usages of
# This cop is used to identify usages of `map { ... }.flatten` and
# change them to use `flat_map { ... }` instead.
#
# @example
# # bad
Expand Down

0 comments on commit 8ee8d3a

Please sign in to comment.