ruby - series
rubocop cleanup
This commit is contained in:
parent
6b0ff24ee0
commit
1eb8eb0e30
@ -1,12 +1,11 @@
|
||||
# Series class
|
||||
class Series
|
||||
def initialize(digits)
|
||||
@digits = digits
|
||||
end
|
||||
|
||||
def slices(slice_length)
|
||||
if slice_length > @digits.length
|
||||
raise ArgumentError
|
||||
end
|
||||
raise ArgumentError if slice_length > @digits.length
|
||||
|
||||
slices = []
|
||||
0.upto(@digits.length - slice_length) do |i|
|
||||
|
Loading…
x
Reference in New Issue
Block a user