Skip to content
This repository has been archived by the owner on Jun 27, 2019. It is now read-only.

Commit

Permalink
Enable Layout/CaseIndentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleksei12942 committed Jul 12, 2018
1 parent 65e8674 commit 5a457bd
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions 2355/1/koans/triangle.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,18 @@
#
# rubocop:disable Style/IfUnlessModifier
# rubocop:disable Style/EmptyCaseCondition
# rubocop:disable Layout/CaseIndentation
# rubocop:disable Metrics/AbcSize
# rubocop:disable Metrics/MethodLength
# This method smells of :reek:UtilityFunction
# This method smells of :reek:DuplicateMethodCall
def triangle_type(first_side, second_side, third_side)
case
when first_side == second_side && second_side == third_side
:equilateral
when first_side == second_side || second_side == third_side || first_side == third_side
:isosceles
else
:scalene
when first_side == second_side && second_side == third_side
:equilateral
when first_side == second_side || second_side == third_side || first_side == third_side
:isosceles
else
:scalene
end
end

Expand Down Expand Up @@ -58,6 +57,5 @@ class TriangleError < StandardError
end
# rubocop:enable Style/IfUnlessModifier
# rubocop:enable Style/EmptyCaseCondition
# rubocop:enable Layout/CaseIndentation
# rubocop:enable Metrics/AbcSize
# rubocop:enable Metrics/MethodLength

0 comments on commit 5a457bd

Please sign in to comment.