Module: Cyrel::Pattern
- Defined in:
- lib/cyrel/pattern.rb,
lib/cyrel/pattern/node.rb,
lib/cyrel/pattern/path.rb,
lib/cyrel/pattern/relationship.rb
Overview
Namespace for classes representing structural components of Cypher patterns (nodes, relationships, paths).
Defined Under Namespace
Classes: Node, Path, Relationship
Class Method Summary collapse
-
.assert_pattern!(pattern, context) ⇒ Object
Validates that the given object is a usable pattern (Path, Node, or Relationship).
Class Method Details
.assert_pattern!(pattern, context) ⇒ Object
Validates that the given object is a usable pattern (Path, Node, or Relationship).
11 12 13 14 15 16 |
# File 'lib/cyrel/pattern.rb', line 11 def self.assert_pattern!(pattern, context) return pattern if pattern.is_a?(Path) || pattern.is_a?(Node) || pattern.is_a?(Relationship) raise ArgumentError, "#{context} pattern must be a Cyrel::Pattern::Path, Node, or Relationship, got #{pattern.class}" end |