Class: ActiveFacts::CQL::Compiler::Negate
- Inherits:
-
Object
- Object
- ActiveFacts::CQL::Compiler::Negate
- Defined in:
- lib/activefacts/cql/compiler/expression.rb
Instance Attribute Summary collapse
-
#term ⇒ Object
Returns the value of attribute term.
Instance Method Summary collapse
- #identify_player(context) ⇒ Object
-
#initialize(term) ⇒ Negate
constructor
A new instance of Negate.
-
#inspect ⇒ Object
def result_type_name(context) raise hell end.
- #operator ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(term) ⇒ Negate
Returns a new instance of Negate.
355 356 357 |
# File 'lib/activefacts/cql/compiler/expression.rb', line 355 def initialize term @term = term end |
Instance Attribute Details
#term ⇒ Object
Returns the value of attribute term.
354 355 356 |
# File 'lib/activefacts/cql/compiler/expression.rb', line 354 def term @term end |
Instance Method Details
#identify_player(context) ⇒ Object
363 364 365 366 367 368 369 |
# File 'lib/activefacts/cql/compiler/expression.rb', line 363 def identify_player context @player || begin # The player in @term have already been identified v = context.vocabulary @player = @term.player end end |
#inspect ⇒ Object
def result_type_name(context)
raise hell
end
377 |
# File 'lib/activefacts/cql/compiler/expression.rb', line 377 def inspect; to_s; end |
#operator ⇒ Object
359 360 361 |
# File 'lib/activefacts/cql/compiler/expression.rb', line 359 def operator '0-' end |
#to_s ⇒ Object
379 380 381 |
# File 'lib/activefacts/cql/compiler/expression.rb', line 379 def to_s "NEGATIVE(#{term.to_s})" end |