Sha256: 12a458831bb6609816d1db55745367834b6acdab2731d5605e3a2083c701bed1
Contents?: true
Size: 719 Bytes
Versions: 32
Compression:
Stored size: 719 Bytes
Contents
module Shoulda module Matchers module ActiveRecord # @private module Uniqueness # @private class Namespace def initialize(constant) @constant = constant end def has?(name) constant.const_defined?(name) end def set(name, value) constant.const_set(name, value) end def clear constant.constants.each do |child_constant| constant.__send__(:remove_const, child_constant) end end def to_s constant.to_s end protected attr_reader :constant end end end end end
Version data entries
32 entries across 32 versions & 2 rubygems