Class: Lazily::Proxy
Instance Method Summary collapse
- #each(&block) ⇒ Object
-
#initialize(source) ⇒ Proxy
constructor
A new instance of Proxy.
- #inspect ⇒ Object
Methods included from Enumerable
#[], #chunk, #collect, #compact, #concat, #drop, #drop_while, #flat_map, #flatten, #grep, #in_threads, #lazily, #lazy?, #prefetch, #reject, #select, #slice_before, #take, #take_while, #uniq, #zip
Methods included from Enumerable
Constructor Details
#initialize(source) ⇒ Proxy
Returns a new instance of Proxy.
21 22 23 |
# File 'lib/lazily/proxy.rb', line 21 def initialize(source) @source = source end |
Instance Method Details
#each(&block) ⇒ Object
25 26 27 28 |
# File 'lib/lazily/proxy.rb', line 25 def each(&block) return to_enum unless block @source.each(&block) end |
#inspect ⇒ Object
30 31 32 |
# File 'lib/lazily/proxy.rb', line 30 def inspect "#<#{self.class}: #{@source.inspect}>" end |