Class: ActiveFacts::CQL::Compiler::ReadingMatchSideEffect
- Inherits:
-
Object
- Object
- ActiveFacts::CQL::Compiler::ReadingMatchSideEffect
- Defined in:
- lib/activefacts/cql/compiler/reading.rb
Overview
An instance of ReadingMatchSideEffects is created when the compiler matches an existing fact type. It captures the details that have to be adjusted for the match to be regarded a success.
Instance Attribute Summary collapse
-
#absorbed_followers ⇒ Object
readonly
Returns the value of attribute absorbed_followers.
-
#absorbed_precursors ⇒ Object
readonly
Returns the value of attribute absorbed_precursors.
-
#common_supertype ⇒ Object
readonly
Returns the value of attribute common_supertype.
-
#num ⇒ Object
readonly
Returns the value of attribute num.
-
#phrase ⇒ Object
readonly
Returns the value of attribute phrase.
-
#residual_adjectives ⇒ Object
readonly
Returns the value of attribute residual_adjectives.
-
#role_ref ⇒ Object
readonly
Returns the value of attribute role_ref.
Instance Method Summary collapse
- #cost ⇒ Object
-
#initialize(phrase, role_ref, num, absorbed_precursors, absorbed_followers, common_supertype, residual_adjectives) ⇒ ReadingMatchSideEffect
constructor
A new instance of ReadingMatchSideEffect.
Constructor Details
#initialize(phrase, role_ref, num, absorbed_precursors, absorbed_followers, common_supertype, residual_adjectives) ⇒ ReadingMatchSideEffect
Returns a new instance of ReadingMatchSideEffect.
604 605 606 607 608 609 610 611 612 |
# File 'lib/activefacts/cql/compiler/reading.rb', line 604 def initialize phrase, role_ref, num, absorbed_precursors, absorbed_followers, common_supertype, residual_adjectives @phrase = phrase @role_ref = role_ref @num = num @absorbed_precursors = absorbed_precursors @absorbed_followers = absorbed_followers @common_supertype = common_supertype @residual_adjectives = residual_adjectives end |
Instance Attribute Details
#absorbed_followers ⇒ Object (readonly)
Returns the value of attribute absorbed_followers.
602 603 604 |
# File 'lib/activefacts/cql/compiler/reading.rb', line 602 def absorbed_followers @absorbed_followers end |
#absorbed_precursors ⇒ Object (readonly)
Returns the value of attribute absorbed_precursors.
602 603 604 |
# File 'lib/activefacts/cql/compiler/reading.rb', line 602 def absorbed_precursors @absorbed_precursors end |
#common_supertype ⇒ Object (readonly)
Returns the value of attribute common_supertype.
602 603 604 |
# File 'lib/activefacts/cql/compiler/reading.rb', line 602 def common_supertype @common_supertype end |
#num ⇒ Object (readonly)
Returns the value of attribute num.
602 603 604 |
# File 'lib/activefacts/cql/compiler/reading.rb', line 602 def num @num end |
#phrase ⇒ Object (readonly)
Returns the value of attribute phrase.
602 603 604 |
# File 'lib/activefacts/cql/compiler/reading.rb', line 602 def phrase @phrase end |
#residual_adjectives ⇒ Object (readonly)
Returns the value of attribute residual_adjectives.
602 603 604 |
# File 'lib/activefacts/cql/compiler/reading.rb', line 602 def residual_adjectives @residual_adjectives end |
#role_ref ⇒ Object (readonly)
Returns the value of attribute role_ref.
602 603 604 |
# File 'lib/activefacts/cql/compiler/reading.rb', line 602 def role_ref @role_ref end |
Instance Method Details
#cost ⇒ Object
614 615 616 |
# File 'lib/activefacts/cql/compiler/reading.rb', line 614 def cost absorbed_precursors + absorbed_followers + (common_supertype ? 1 : 0) end |