class ActiveEntity::ConversionDefinitions
Public Class Methods
get(type)
click to toggle source
@param [Class, Symbol, String] type @return [Proc]
# File lib/active_entity/conversion_definitions.rb, line 6 def get(type) type_casting_procs.get(type) end
run_with_new_then_restore() { || ... }
click to toggle source
Run block with new type_casting_procs. For test purpose. @return [nil]
# File lib/active_entity/conversion_definitions.rb, line 18 def run_with_new_then_restore old, @type_casting_procs = type_casting_procs, MapWithNormalizing.new yield @type_casting_procs = old nil end
set(type, &block)
click to toggle source
@param [Class, Symbol, String] type @return [Proc]
# File lib/active_entity/conversion_definitions.rb, line 12 def set(type, &block) type_casting_procs.set(type, &block) end
Private Class Methods
type_casting_procs()
click to toggle source
# File lib/active_entity/conversion_definitions.rb, line 27 def type_casting_procs @type_casting_procs ||= MapWithNormalizing.new end