Enforce case requires else; allow else nil

This commit is contained in:
Benjamin Fleischer 2015-09-21 00:36:18 -05:00
parent bac43af0e6
commit 1d8a3d039a
2 changed files with 9 additions and 0 deletions

View File

@ -45,6 +45,13 @@ Style/ClassAndModuleChildren:
Style/Documentation:
Enabled: false
Style/MissingElse:
Enabled: true
EnforcedStyle: case
Style/EmptyElse:
EnforcedStyle: empty
Style/MultilineOperationIndentation:
EnforcedStyle: indented

View File

@ -68,6 +68,8 @@ module ActiveModel
self.class.new(@hash[:*])
when @hash.key?(:**)
self.class.new(:** => {})
else
nil
end
end
end