Class: Neo4j::Cypher::Label

Inherits:
Object
  • Object
show all
Includes:
Clause
Defined in:
lib/neo4j-cypher/create.rb

Constant Summary

Constants included from Clause

Clause::NAME, Clause::ORDER

Instance Attribute Summary

Attributes included from Clause

#clause_list, #clause_type, #eval_context, #expr, #insert_order

Instance Method Summary collapse

Methods included from Clause

#<=>, #alias_name, #as_alias, #as_alias?, #clause_position, #create_clause_args_for, #match_value, #match_value=, #prefix, #referenced!, #referenced?, #return_value, #separator, #to_prop_string, #valid_clause?, #var_name, #var_name=

Constructor Details

#initialize(clause_list, var, labels, clause_type) ⇒ Label

Returns a new instance of Label.



7
8
9
10
11
# File 'lib/neo4j-cypher/create.rb', line 7

def initialize(clause_list, var, labels, clause_type)
  super(clause_list, clause_type)
  @var = var
  @labels = labels
end

Instance Method Details

#to_cypherObject



13
14
15
# File 'lib/neo4j-cypher/create.rb', line 13

def to_cypher
  "#{@var.var_name.to_s} :#{@labels.map(&:to_s).join(':')}"
end