Module: Bulkrax::FactoryClassFinder::DefaultCoercer

Defined in:
app/services/bulkrax/factory_class_finder.rb

Overview

The v6.0.0 default coercer. Responsible for converting a factory class name to a constant.

Class Method Summary collapse

Class Method Details

.call(name) ⇒ Class

Returns when the name is a coercible constant.

Parameters:

  • name (String)

Returns:

  • (Class)

    when the name is a coercible constant.

Raises:

  • (NameError)

    when the name is not coercible to a constant.



12
13
14
# File 'app/services/bulkrax/factory_class_finder.rb', line 12

def self.call(name)
  name.constantize
end