Skip to content

Commit

Permalink
Fix Style/FloatDivision
Browse files Browse the repository at this point in the history
  • Loading branch information
tvdeyen committed Mar 18, 2020
1 parent 4b41906 commit cb6587b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ Style/EmptyLiteral:
Style/ClassVars:
Enabled: false

Style/FloatDivision:
EnforcedStyle: left_coerce

# This has been used for customization
Style/MutableConstant:
Enabled: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def ratio_from_size_or_settings
if @min_size.value?(0) && @essence_picture.content.settings[:fixed_ratio].to_s =~ FLOAT_REGEX
@essence_picture.content.settings[:fixed_ratio].to_f
elsif !@min_size[:width].zero? && !@min_size[:height].zero?
@min_size[:width].to_f / @min_size[:height].to_f
@min_size[:width].to_f / @min_size[:height]
else
false
end
Expand Down

0 comments on commit cb6587b

Please sign in to comment.