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