Module: Virtus::ConstMissingExtensions

Included in:
ClassMethods, ModuleExtensions
Defined in:
lib/virtus/const_missing_extensions.rb

Instance Method Summary collapse

Instance Method Details

#const_missing(name) ⇒ Class

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.

Hooks into const missing process to determine types of attributes

Parameters:

  • name (String)

Returns:

  • (Class)

11
12
13
14
15
# File 'lib/virtus/const_missing_extensions.rb', line 11

def const_missing(name)
  Attribute::Builder.determine_type(name) or
    Axiom::Types.const_defined?(name) && Axiom::Types.const_get(name) or
    super
end