class EditInPlace::FieldTypeRegistrar

{FieldTypeRegistrar} is a subcalss of {Registrar} that only allows {FieldType} instances and field type classes to be registered.

@author Jacob Lockard @since 0.1.0

Protected Instance Methods

validate_registration!(name, field_type) click to toggle source

Adds to the default validate_registration! implementation by ensuring that only {FieldType} instances or field type classes can be registered. @param name [Symbol] the name to validate. @param field_type [FieldType, Class] the field type to validate. @return [void]

Calls superclass method
# File lib/edit_in_place/field_type_registrar.rb, line 19
def validate_registration!(name, field_type)
  super
  unless field_type.is_a?(FieldType) || field_type.instance_of?(Class)
    raise InvalidFieldTypeError, field_type
  end
end