Class: ActiveFacts::CQL::Compiler::SimpleMatching
- Inherits:
-
Object
- Object
- ActiveFacts::CQL::Compiler::SimpleMatching
- Defined in:
- lib/activefacts/cql/compiler/transform_rule.rb
Instance Attribute Summary collapse
-
#targ_term_list ⇒ Object
Returns the value of attribute targ_term_list.
-
#transform_expr ⇒ Object
Returns the value of attribute transform_expr.
Instance Method Summary collapse
- #compile(context) ⇒ Object
-
#initialize(targ_term_list, transform_expr) ⇒ SimpleMatching
constructor
A new instance of SimpleMatching.
Constructor Details
#initialize(targ_term_list, transform_expr) ⇒ SimpleMatching
Returns a new instance of SimpleMatching.
88 89 90 91 |
# File 'lib/activefacts/cql/compiler/transform_rule.rb', line 88 def initialize targ_term_list, transform_expr @targ_term_list = targ_term_list @transform_expr = transform_expr end |
Instance Attribute Details
#targ_term_list ⇒ Object
Returns the value of attribute targ_term_list.
86 87 88 |
# File 'lib/activefacts/cql/compiler/transform_rule.rb', line 86 def targ_term_list @targ_term_list end |
#transform_expr ⇒ Object
Returns the value of attribute transform_expr.
86 87 88 |
# File 'lib/activefacts/cql/compiler/transform_rule.rb', line 86 def transform_expr @transform_expr end |
Instance Method Details
#compile(context) ⇒ Object
93 94 95 96 97 98 99 100 101 102 |
# File 'lib/activefacts/cql/compiler/transform_rule.rb', line 93 def compile(context) vocabulary_identifier = context.vocabulary. constellation = context.vocabulary.constellation expr = transform_expr ? transform_expr.compile(context) : nil simple_rule = constellation.SimpleMatching(:new, :expression => expr) ActiveFacts::CQL::Compiler.build_transform_target_refs(context, @targ_term_list, simple_rule) simple_rule end |