Class: ConceptQL::GraphNodifier

Inherits:
Object
  • Object
show all
Defined in:
lib/conceptql/graph_nodifier.rb

Defined Under Namespace

Classes: BinaryOperatorNode, DotNode

Constant Summary collapse

BINARY_OPERATOR_TYPES =
%w(before after meets met_by started_by starts contains during overlaps overlapped_by finished_by finishes coincides except person_filter less_than less_than_or_equal equal not_equal greater_than greater_than_or_equal filter).map { |temp| [temp, "not_#{temp}"] }.flatten.map(&:to_sym)

Instance Method Summary collapse

Instance Method Details

#create(type, values) ⇒ Object



125
126
127
128
129
130
# File 'lib/conceptql/graph_nodifier.rb', line 125

def create(type, values)
  if BINARY_OPERATOR_TYPES.include?(type)
    return BinaryOperatorNode.new(type, values)
  end
  DotNode.new(type, values)
end