Class: ActiveEntity::ConversionDefinitions
- Inherits:
-
Object
- Object
- ActiveEntity::ConversionDefinitions
- Defined in:
- lib/active_entity/conversion_definitions.rb
Defined Under Namespace
Classes: MapWithNormalizing
Class Method Summary collapse
- .get(type) ⇒ Proc
-
.run_with_new_then_restore ⇒ nil
Run block with new type_casting_procs.
- .set(type, &block) ⇒ Proc
Class Method Details
.get(type) ⇒ Proc
6 7 8 |
# File 'lib/active_entity/conversion_definitions.rb', line 6 def get(type) type_casting_procs.get(type) end |
.run_with_new_then_restore ⇒ nil
Run block with new type_casting_procs. For test purpose.
18 19 20 21 22 23 |
# 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) ⇒ Proc
12 13 14 |
# File 'lib/active_entity/conversion_definitions.rb', line 12 def set(type, &block) type_casting_procs.set(type, &block) end |