Class: CypherBuilder::Field
- Inherits:
-
Object
- Object
- CypherBuilder::Field
- Defined in:
- lib/cypher_builder/field.rb
Instance Method Summary collapse
- #as_cypher(_) ⇒ Object
-
#initialize(prefix = nil, name) ⇒ Field
constructor
A new instance of Field.
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 |