Class: Hold::ArrayCell::LazyArray
- Inherits:
-
ThinModels::LazyArray::Memoized
- Object
- ThinModels::LazyArray::Memoized
- Hold::ArrayCell::LazyArray
- Defined in:
- lib/hold/interfaces/array_cell.rb
Instance Method Summary collapse
- #_each(&b) ⇒ Object
- #_length ⇒ Object
-
#initialize(array_cell) ⇒ LazyArray
constructor
A new instance of LazyArray.
- #slice_from_start_and_length(start, length) ⇒ Object
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 |
#_length ⇒ Object
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 |