Sha256: 8ec0172e4f65bb7676ebe6182a952e4231d7b9ec1588cceb9b56b23cb93799d7
Contents?: true
Size: 327 Bytes
Versions: 2
Compression:
Stored size: 327 Bytes
Contents
module CypherBuilder def Alias(field, an_alias) Alias.new(field, an_alias) end class Alias include Resolver def initialize(field, an_alias) @field = wrap(field) @an_alias = an_alias end def as_cypher(opts) sprintf('%s AS %s', resolve(@field, ** opts), @an_alias) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
cypher_builder-0.0.2 | lib/cypher_builder/alias.rb |
cypher_builder-0.0.1 | lib/cypher_builder/alias.rb |