lib/cloud_sesame/query/ast/literal.rb in CloudSesame-1.0.0 vs lib/cloud_sesame/query/ast/literal.rb in CloudSesame-1.0.1

- old
+ new

@@ -1,12 +1,12 @@ module CloudSesame module Query module AST class Literal - SINGLE_QUATE = Regexp.new(/\'/).freeze - ESCAPE_QUATE = "\\'".freeze + SINGLE_QUOTE = Regexp.new(/'/).freeze + ESCAPE_QUOTE = "\\'".freeze attr_reader :field, :value, :options def initialize(field, value, options = {}) @field = field @@ -40,10 +40,10 @@ def detailed_format "field=#{ escape actual_field_name.to_s } #{ @value.compile }" end def escape(data) - "'#{ data.gsub(SINGLE_QUATE) { ESCAPE_QUATE } }'" + "'#{ data.gsub(SINGLE_QUOTE) { ESCAPE_QUOTE } }'" end def parse_value(value) LazyObject.new { (@options[:type] || Value).parse(value) } end