class CartonDb::Datum::ForPlain

Attributes

plain[R]

Public Class Methods

new(plain) click to toggle source
# File lib/carton_db/datum.rb, line 66
def initialize(plain)
  if (! plain) && plain.nil?
    raise ArgumentError "A non-nil 'plain' value is required."
  end
  @plain = plain
end

Public Instance Methods

==(other)
Alias for: eql?
eql?(other) click to toggle source
# File lib/carton_db/datum.rb, line 81
def eql?(other)
  return false unless other.is_a?(Datum::Base)
  return true if other.class == self.class && @plain == other.plain
  return escaped == other.escaped
end
Also aliased as: ==
escaped() click to toggle source
# File lib/carton_db/datum.rb, line 73
def escaped
  @escaped ||= CartonDb::Escaping.escape(@plain)
end
hash() click to toggle source
# File lib/carton_db/datum.rb, line 89
def hash
  escaped.hash
end
placeholder?() click to toggle source
# File lib/carton_db/datum.rb, line 77
def placeholder?
  false
end