Class: ActiveFacts::CQL::Compiler::Negate

Inherits:
Object
  • Object
show all
Defined in:
lib/activefacts/cql/compiler/expression.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(term) ⇒ Negate

Returns a new instance of Negate.



359
360
361
# File 'lib/activefacts/cql/compiler/expression.rb', line 359

def initialize term
  @term = term
end

Instance Attribute Details

#termObject

Returns the value of attribute term.



358
359
360
# File 'lib/activefacts/cql/compiler/expression.rb', line 358

def term
  @term
end

Instance Method Details

#identify_player(context) ⇒ Object



367
368
369
370
371
372
373
# File 'lib/activefacts/cql/compiler/expression.rb', line 367

def identify_player context
  @player || begin
    # The player in @term have already been identified
    v = context.vocabulary
    @player = @term.player
  end
end

#inspectObject

def result_type_name(context)

  raise hell
end


381
# File 'lib/activefacts/cql/compiler/expression.rb', line 381

def inspect; to_s; end

#operatorObject



363
364
365
# File 'lib/activefacts/cql/compiler/expression.rb', line 363

def operator
  '0-'
end

#to_sObject



383
384
385
# File 'lib/activefacts/cql/compiler/expression.rb', line 383

def to_s
  "negate(#{term.to_s})"
end