Class: Resync::Util::IndexableLazy

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
lib/resync/util/indexable_lazy.rb

Instance Method Summary collapse

Constructor Details

#initialize(array) ⇒ IndexableLazy

Returns a new instance of IndexableLazy.



7
8
9
10
# File 'lib/resync/util/indexable_lazy.rb', line 7

def initialize(array)
  super(array.lazy)
  @array = array
end

Instance Method Details

#[](key) ⇒ Object



12
13
14
# File 'lib/resync/util/indexable_lazy.rb', line 12

def [](key)
  @array[key]
end