Class: Hold::ArrayCell::LazyArray

Inherits:
ThinModels::LazyArray::Memoized
  • Object
show all
Defined in:
lib/hold/interfaces/array_cell.rb

Instance Method Summary collapse

Constructor Details

#initialize(array_cell) ⇒ LazyArray

Returns a new instance of LazyArray.



32
33
34
# File 'lib/hold/interfaces/array_cell.rb', line 32

def initialize(array_cell)
  @array_cell = array_cell
end

Instance Method Details

#_each(&b) ⇒ Object



36
37
38
# File 'lib/hold/interfaces/array_cell.rb', line 36

def _each(&b)
  @array_cell.get.each(&b)
end

#_lengthObject



44
45
46
# File 'lib/hold/interfaces/array_cell.rb', line 44

def _length
  @array_cell.get_length
end

#slice_from_start_and_length(start, length) ⇒ Object



40
41
42
# File 'lib/hold/interfaces/array_cell.rb', line 40

def slice_from_start_and_length(start, length)
  @array_cell.get_slice(start, length)
end