class ViewModel::Registry
def for_view_name(name)
def for_view_name(name) raise ViewModel::DeserializationError::InvalidSyntax.new('ViewModel name cannot be nil') if name.nil? @lock.synchronize do # Resolve names for any deferred viewmodel classes resolve_deferred_classes viewmodel_class = @viewmodel_classes_by_name[name] if viewmodel_class.nil? || !(viewmodel_class < ViewModel) raise ViewModel::DeserializationError::UnknownView.new(name) end viewmodel_class end end