class EvilEvents::Core::System::TypeManager
@api private @since 0.2.0
Attributes
converter[R]
@return [EvilEvents::Shared::TypeConverter]
@since 0.2.0
Public Class Methods
new()
click to toggle source
@since 0.2.0
# File lib/evil_events/core/system/type_manager.rb, line 13 def initialize @converter = EvilEvents::Shared::TypeConverter.new end
Public Instance Methods
register_converter(type, coercer)
click to toggle source
@param type [Symbol] @param coercer [Proc] @return [EvilEvents::Shared::TypeConverter::Converter]
@since 0.2.0
# File lib/evil_events/core/system/type_manager.rb, line 22 def register_converter(type, coercer) converter.register(type, coercer) end
resolve_type(type, **options)
click to toggle source
@param type [Symbol] @param options [Hash] @return [EvilEvents::Shared::Types::Any]
@since 0.2.0
# File lib/evil_events/core/system/type_manager.rb, line 31 def resolve_type(type, **options) converter.resolve_type(type, **options) end