Skip to content

Commit 86f5827

Browse files
authored
Lint: Fix Layout/EndAlignment (#1177)
1 parent 4596969 commit 86f5827

File tree

2 files changed

+9
-21
lines changed

2 files changed

+9
-21
lines changed

.rubocop_todo.yml

Lines changed: 1 addition & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/money/money/allocation.rb

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,14 @@ class Allocation
2222
# @return [Array<Numeric>] An array containing the allocated amounts.
2323
# @raise [ArgumentError] If parts is empty or not provided.
2424
def self.generate(amount, parts, decimal_cutoff = true)
25-
parts = if parts.is_a?(Numeric)
26-
Array.new(parts, 1)
27-
elsif parts.all?(&:zero?)
28-
Array.new(parts.count, 1)
29-
else
30-
parts.dup
31-
end
25+
parts =
26+
if parts.is_a?(Numeric)
27+
Array.new(parts, 1)
28+
elsif parts.all?(&:zero?)
29+
Array.new(parts.count, 1)
30+
else
31+
parts.dup
32+
end
3233

3334
raise ArgumentError, 'need at least one part' if parts.empty?
3435

0 commit comments

Comments
 (0)