Module: DataMapper::Property::Lookup

Defined in:
lib/dm-core/property/lookup.rb

Instance Method Summary collapse

Instance Method Details

#const_missing(name) ⇒ Property (protected)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Provides transparent access to the Properties defined in DataMapper::Property.

Parameters:

  • name (Symbol)

    The name of the property to lookup.

Returns:

  • (Property)

    The property with the given name.

Raises:

  • (NameError)

    The property could not be found.

Since:

  • 1.0.1



24
25
26
# File 'lib/dm-core/property/lookup.rb', line 24

def const_missing(name)
  Property.find_class(name.to_s) || super
end