Class: ActiveFacts::CQL::Compiler::ReferenceMode

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, value_constraint, parameters) ⇒ ReferenceMode

Returns a new instance of ReferenceMode.



8
9
10
11
12
# File 'lib/activefacts/cql/compiler/entity_type.rb', line 8

def initialize name, value_constraint, parameters
  @name = name
  @value_constraint = value_constraint
  @parameters = parameters
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



6
7
8
# File 'lib/activefacts/cql/compiler/entity_type.rb', line 6

def name
  @name
end

#parametersObject (readonly)

Returns the value of attribute parameters.



6
7
8
# File 'lib/activefacts/cql/compiler/entity_type.rb', line 6

def parameters
  @parameters
end

#value_constraintObject (readonly)

Returns the value of attribute value_constraint.



6
7
8
# File 'lib/activefacts/cql/compiler/entity_type.rb', line 6

def value_constraint
  @value_constraint
end

Instance Method Details

#to_sObject



14
15
16
17
18
# File 'lib/activefacts/cql/compiler/entity_type.rb', line 14

def to_s
  "identified by its #{name}" +
    ((p = @parameters).size > 0 ? '('+p*', '+')' : '') +
    ((v = @value_constraint) ? v.to_s : '')
end