Class: Avromatic::Model::Types::AbstractType

Inherits:
Object
  • Object
show all
Defined in:
lib/avromatic/model/types/abstract_type.rb

Instance Method Summary collapse

Instance Method Details

#coerce(_input) ⇒ Object



22
23
24
# File 'lib/avromatic/model/types/abstract_type.rb', line 22

def coerce(_input)
  raise "#{__method__} must be overridden by #{self.class.name}"
end

#coerced?(_value) ⇒ Boolean

Returns:

  • (Boolean)


30
31
32
# File 'lib/avromatic/model/types/abstract_type.rb', line 30

def coerced?(_value)
  raise "#{__method__} must be overridden by #{self.class.name}"
end

#coercible?(_input) ⇒ Boolean

Returns:

  • (Boolean)


26
27
28
# File 'lib/avromatic/model/types/abstract_type.rb', line 26

def coercible?(_input)
  raise "#{__method__} must be overridden by #{self.class.name}"
end

#input_classesObject



14
15
16
# File 'lib/avromatic/model/types/abstract_type.rb', line 14

def input_classes
  value_classes
end

#nameObject



18
19
20
# File 'lib/avromatic/model/types/abstract_type.rb', line 18

def name
  raise "#{__method__} must be overridden by #{self.class.name}"
end

#referenced_model_classesObject



40
41
42
# File 'lib/avromatic/model/types/abstract_type.rb', line 40

def referenced_model_classes
  raise "#{__method__} must be overridden by #{self.class.name}"
end

#serialize(_value, _strict) ⇒ Object

Note we use positional args rather than keyword args to reduce memory allocations



36
37
38
# File 'lib/avromatic/model/types/abstract_type.rb', line 36

def serialize(_value, _strict)
  raise "#{__method__} must be overridden by #{self.class.name}"
end

#value_classesObject



10
11
12
# File 'lib/avromatic/model/types/abstract_type.rb', line 10

def value_classes
  raise "#{__method__} must be overridden by #{self.class.name}"
end