method
observer_class_for
v3.1.0 -
Show latest stable
- Class:
ActiveModel::ObserverArray
observer_class_for(observer)protected
No documentation available.
# File activemodel/lib/active_model/observer_array.rb, line 74
def observer_class_for(observer)
return observer if observer.is_a?(Class)
if observer.respond_to?(:to_sym) # string/symbol
observer.to_s.camelize.constantize
else
raise ArgumentError, "#{observer} was not a class or a " +
"lowercase, underscored class name as expected."
end
end