Class: Ov::OA
- Inherits:
-
Array
- Object
- Array
- Ov::OA
- Defined in:
- lib/ov/ov_array.rb
Instance Attribute Summary collapse
-
#complete ⇒ Object
Returns the value of attribute complete.
-
#result ⇒ Object
(also: #get)
Returns the value of attribute result.
Instance Method Summary collapse
- #find_or_next(method, &block) ⇒ Object
-
#where(method) ⇒ Object
find in self find in ancestors find types find any types.
Instance Attribute Details
#complete ⇒ Object
Returns the value of attribute complete.
3 4 5 |
# File 'lib/ov/ov_array.rb', line 3 def complete @complete end |
#result ⇒ Object Also known as: get
Returns the value of attribute result.
3 4 5 |
# File 'lib/ov/ov_array.rb', line 3 def result @result end |
Instance Method Details
#find_or_next(method, &block) ⇒ Object
21 22 23 24 25 26 |
# File 'lib/ov/ov_array.rb', line 21 def find_or_next(method, &block) return self if @complete ev_block = yield(method) @complete, @result = true, ev_block if ev_block self end |
#where(method) ⇒ Object
find in self find in ancestors find types find any types
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/ov/ov_array.rb', line 8 def where(method) @complete, @result = nil, nil z = find_or_next(method) { |method| self.find{|m| m.eql?(method) } }.find_or_next(method) { |method| self.find{|m| m.eql0?(method) } }.find_or_next(method) { |method| self.find{|m| m.like?(method) } }.find_or_next(method) {|method| self.find{|m| m.like0?(method) } }.get end |