Class: Rupture::RArraySeq
Constant Summary
Constants inherited
from Seq
Seq::Empty
Instance Method Summary
collapse
Methods inherited from ArraySeq
#first
Methods inherited from Seq
#[], #eql?, #inspect, #to_ary
Methods included from Sequence
#concat, #conj, #count, #divide, #doall, #drop, #drop_last, #drop_while, #each, #empty?, #every?, #filter, #first, #flatten, #foldr, #frequencies, #into, #last, #map, #map_indexed, #mapcat, #next, #not_empty, #nth, #partition, #partition_all, #partition_between, #partition_by, #reduce, #reductions, #remove, #reverse, #second, #separate, #sequential?, #some, #sort, #sort_by, #split_at, #split_with, #take, #take_last, #take_while, #tree_seq
Constructor Details
#initialize(array, index = array.size - 1) ⇒ RArraySeq
Returns a new instance of RArraySeq.
26
27
28
|
# File 'lib/rupture/array_seq.rb', line 26
def initialize(array, index = array.size - 1)
super(array, index)
end
|
Instance Method Details
30
31
32
|
# File 'lib/rupture/array_seq.rb', line 30
def rest
RArraySeq.new(@array, @index.dec)
end
|
34
35
36
|
# File 'lib/rupture/array_seq.rb', line 34
def seq
self if @index >= 0
end
|
38
39
40
|
# File 'lib/rupture/array_seq.rb', line 38
def size
@index.inc
end
|