Class: Ori::LazyEnumerable
- Inherits:
-
Lazy
- Object
- Lazy
- Ori::LazyEnumerable
show all
- Defined in:
- lib/ori/lazy.rb
Instance Method Summary
collapse
Methods inherited from Lazy
#initialize, #initialized?, #internal
Constructor Details
This class inherits a constructor from Ori::Lazy
Instance Method Details
#any?(&block) ⇒ Boolean
33
34
35
36
37
|
# File 'lib/ori/lazy.rb', line 33
def any?(&block)
return false unless initialized?
internal.any?(&block)
end
|
#delete_if(&block) ⇒ Object
27
28
29
30
31
|
# File 'lib/ori/lazy.rb', line 27
def delete_if(&block)
return self unless initialized?
internal.delete_if(&block)
end
|
#each(&block) ⇒ Object
20
21
22
23
24
25
|
# File 'lib/ori/lazy.rb', line 20
def each(&block)
return enum_for(:each) unless block_given?
return self unless initialized?
internal.each(&block)
end
|
#empty? ⇒ Boolean
39
40
41
42
43
|
# File 'lib/ori/lazy.rb', line 39
def empty?
return true unless initialized?
internal.empty?
end
|