Sha256: ecc0e0d5f4bddea12d0468d2d5fcc0678be1bf9d1090cf083db90395e5f9ef24

Contents?: true

Size: 257 Bytes

Versions: 5

Compression:

Stored size: 257 Bytes

Contents

module CypherBuilder
  def Literal(*args)
    Literal.new(*args)
  end

  class Literal
    include Resolver
    def initialize(value)
      @value = value
    end

    def as_cypher(_)
      # TODO escape "'"
      sprintf('"%s"', @value)
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
cypher_builder-0.0.5 lib/cypher_builder/literal.rb
cypher_builder-0.0.4 lib/cypher_builder/literal.rb
cypher_builder-0.0.3 lib/cypher_builder/literal.rb
cypher_builder-0.0.2 lib/cypher_builder/literal.rb
cypher_builder-0.0.1 lib/cypher_builder/literal.rb