Class: Factbase::Inv::Query
- Inherits:
-
Object
- Object
- Factbase::Inv::Query
- Defined in:
- lib/factbase/inv.rb
Overview
Query decorator.
This is an internal class, it is not supposed to be instantiated directly.
Instance Method Summary collapse
- #each(fb = @fb, params = {}) ⇒ Object
-
#initialize(query, block, fb) ⇒ Query
constructor
A new instance of Query.
Constructor Details
#initialize(query, block, fb) ⇒ Query
Returns a new instance of Query.
79 80 81 82 83 |
# File 'lib/factbase/inv.rb', line 79 def initialize(query, block, fb) @query = query @block = block @fb = fb end |
Instance Method Details
#each(fb = @fb, params = {}) ⇒ Object
85 86 87 88 89 90 |
# File 'lib/factbase/inv.rb', line 85 def each(fb = @fb, params = {}) return to_enum(__method__, fb, params) unless block_given? @query.each(fb, params) do |f| yield Fact.new(f, @block) end end |