Class: Wongi::Engine::DSL::Query
- Inherits:
-
Rule
- Object
- Rule
- Wongi::Engine::DSL::Query
show all
- Defined in:
- lib/wongi-engine/dsl/query.rb
Instance Attribute Summary
Attributes inherited from Rule
#name
Instance Method Summary
collapse
Methods inherited from Rule
#accept, #acceptors, #actions, #actions=, #conditions, #conditions=, #initialize, section, sections
Instance Method Details
#import_into(model) ⇒ Object
8
9
10
|
# File 'lib/wongi-engine/dsl/query.rb', line 8
def import_into(model)
super.tap { |copy| copy.search_on(*parameters) }
end
|
#install(rete) ⇒ Object
16
17
18
|
# File 'lib/wongi-engine/dsl/query.rb', line 16
def install(rete)
rete.install_query(self)
end
|
#parameters ⇒ Object
12
13
14
|
# File 'lib/wongi-engine/dsl/query.rb', line 12
def parameters
@parameters ||= []
end
|
#search_on(*terms) ⇒ Object
4
5
6
|
# File 'lib/wongi-engine/dsl/query.rb', line 4
def search_on(*terms)
terms.each { |term| parameters << term }
end
|