Class: ActiveFacts::Input::CQL::SymbolTable::Binding

Inherits:
Struct
  • Object
show all
Defined in:
lib/activefacts/input/cql.rb,
lib/activefacts/input/cql.rb

Overview

A Binding here is a form of reference to a concept, being a name and optional adjectives, possibly designated by a role name:

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#conceptObject

Returns the value of attribute concept

Returns:

  • (Object)

    the current value of concept



1043
1044
1045
# File 'lib/activefacts/input/cql.rb', line 1043

def concept
  @concept
end

#leading_adjectiveObject

Returns the value of attribute leading_adjective

Returns:

  • (Object)

    the current value of leading_adjective



1043
1044
1045
# File 'lib/activefacts/input/cql.rb', line 1043

def leading_adjective
  @leading_adjective
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



1043
1044
1045
# File 'lib/activefacts/input/cql.rb', line 1043

def name
  @name
end

#role_nameObject

Returns the value of attribute role_name

Returns:

  • (Object)

    the current value of role_name



1043
1044
1045
# File 'lib/activefacts/input/cql.rb', line 1043

def role_name
  @role_name
end

#trailing_adjectiveObject

Returns the value of attribute trailing_adjective

Returns:

  • (Object)

    the current value of trailing_adjective



1043
1044
1045
# File 'lib/activefacts/input/cql.rb', line 1043

def trailing_adjective
  @trailing_adjective
end

Instance Method Details

#<=>(other) ⇒ Object

Any ordering works to allow a hash to be keyed by a set (unordered array) of Bindings:



1050
1051
1052
# File 'lib/activefacts/input/cql.rb', line 1050

def <=>(other)
  object_id <=> other.object_id
end

#inspectObject



1045
1046
1047
# File 'lib/activefacts/input/cql.rb', line 1045

def inspect
  "Binding(#{concept.class.basename} #{concept.name}, #{[leading_adjective, name, trailing_adjective].compact*"-"}#{role_name ? " (as #{role_name})" : ""})"
end