Class: CypherBuilder::Field

Inherits:
Object
  • Object
show all
Defined in:
lib/cypher_builder/field.rb

Instance Method Summary collapse

Constructor Details

#initialize(prefix = nil, name) ⇒ Field

Returns a new instance of Field.



7
8
9
# File 'lib/cypher_builder/field.rb', line 7

def initialize(prefix = nil, name)
  @prefix, @name = prefix, name
end

Instance Method Details

#as_cypher(_) ⇒ Object



11
12
13
# File 'lib/cypher_builder/field.rb', line 11

def as_cypher(_)
  [@prefix, @name].compact.join('.')
end