Sha256: cc111b835a760d1f8c4758dedcad49179bd54b39fa6e8aa7d6f99ea6f108aecd

Contents?: true

Size: 403 Bytes

Versions: 1

Compression:

Stored size: 403 Bytes

Contents

module DataMapper
  class Property
    class Class < Object
      load_as         ::Class
      dump_as         ::Class
      coercion_method :to_constant

      # @api semipublic
      def typecast(value)
        DataMapper::Ext::Module.find_const(model, value.to_s) unless value.nil?
      rescue NameError
        value
      end

    end # class Class
  end # class Property
end # module DataMapper

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ghost_dm-core-1.3.0.beta lib/dm-core/property/class.rb