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.



355
356
357
# File 'lib/activefacts/cql/compiler/expression.rb', line 355

def initialize term
  @term = term
end

Instance Attribute Details

#termObject

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

#inspectObject

def result_type_name(context)

  raise hell
end


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

def inspect; to_s; end

#operatorObject



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

def operator
  '0-'
end

#to_sObject



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

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