Sha256: a887998f1c412dfd3af187044d62daa19fbfc4efc52f5b42064987c1986ae776
Contents?: true
Size: 682 Bytes
Versions: 3
Compression:
Stored size: 682 Bytes
Contents
module Ruby class Reflection class ConstantMirror < FieldMirror def value if path = @object.autoload?(@name) unless $LOADED_FEATURES.include?(path) || $LOADED_FEATURES.include?(File.expand_path(path)) # Do not trigger autoload return nil end end reflection.reflect @object.const_get(@name) end def value=(o) @object.const_set(@name, o) end def public? true end def protected? false end def private? false end def delete @object.send(:remove_const, @name) end end end end
Version data entries
3 entries across 3 versions & 1 rubygems