Skip to content

Commit

Permalink
Merge pull request rubocop#9397 from Bhacaz/doc_supported_types
Browse files Browse the repository at this point in the history
Add documentation for Layout/MultilineAssignmentLayout `SupportedTypes`
  • Loading branch information
koic committed Feb 5, 2021
2 parents edef5e2 + 86e5a2b commit 21b6bfb
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions lib/rubocop/cop/layout/multiline_assignment_layout.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,32 @@ module Layout
# foo = if expression
# 'bar'
# end
#
# @example SupportedTypes: ['block', 'case', 'class', 'if', 'kwbegin', 'module'] (default)
# # good
# foo =
# if expression
# 'bar'
# end
#
# # good
# foo =
# [1].map do |i|
# i + 1
# end
#
# @example SupportedTypes: ['block']
# # good
# foo = if expression
# 'bar'
# end
#
# # good
# foo =
# [1].map do |i|
# 'bar' * i
# end
#
class MultilineAssignmentLayout < Base
include CheckAssignment
include ConfigurableEnforcedStyle
Expand Down

0 comments on commit 21b6bfb

Please sign in to comment.