Class: Aspen::AbstractStatement

Inherits:
Object
  • Object
show all
Defined in:
lib/aspen/abstract_statement.rb

Direct Known Subclasses

CustomStatement, Statement

Instance Method Summary collapse

Instance Method Details

#nodesArray<Aspen::Node>

Returns a list of nodes from the statement.

Returns:

  • (Array<Aspen::Node>)

    a list of nodes from the statement

Raises:

  • (NotImplementedError)


24
25
26
# File 'lib/aspen/abstract_statement.rb', line 24

def nodes
  raise NotImplementedError, "Find me in #{__FILE__}"
end

#signatureString

Returns a short description the relationship contained in the statement.

Examples:

Company hired a Person

(Company)-[HIRED]->(Person)

Person knows Person, reciprocally

(Person)-[KNOWS]-(Person)

Returns:

  • (String)

    a short description the relationship contained in the statement

Raises:

  • (NotImplementedError)


19
20
21
# File 'lib/aspen/abstract_statement.rb', line 19

def signature
  raise NotImplementedError, "Find me in #{__FILE__}"
end

#to_cypherString

Returns the Cypher query from this particular statement.

Returns:

  • (String)

    the Cypher query from this particular statement

Raises:

  • (NotImplementedError)


29
30
31
# File 'lib/aspen/abstract_statement.rb', line 29

def to_cypher
  raise NotImplementedError, "Find me in #{__FILE__}"
end

#typeString

Returns the type of statement (:vanilla, :custom).

Returns:

  • (String)

    the type of statement (:vanilla, :custom)

Raises:

  • (NotImplementedError)


10
11
12
# File 'lib/aspen/abstract_statement.rb', line 10

def type
  raise NotImplementedError, "Find me in #{__FILE__}"
end