Module: Necromancer::HashConverters
- Defined in:
- lib/necromancer/converters/hash.rb
Defined Under Namespace
Classes: StringToBooleanHashConverter, StringToFloatHashConverter, StringToHashConverter, StringToIntegerHashConverter, StringToNumericHashConverter
Class Method Summary collapse
Class Method Details
.load(conversions) ⇒ Object
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
# File 'lib/necromancer/converters/hash.rb', line 103 def self.load(conversions) [ NullConverter.new(:hash, :hash), StringToHashConverter.new(:string, :hash), StringToIntegerHashConverter.new(:string, :int_hash), StringToIntegerHashConverter.new(:string, :integer_hash), StringToFloatHashConverter.new(:string, :float_hash), StringToNumericHashConverter.new(:string, :num_hash), StringToNumericHashConverter.new(:string, :numeric_hash), StringToBooleanHashConverter.new(:string, :boolean_hash), StringToBooleanHashConverter.new(:string, :bool_hash) ].each do |converter| conversions.register(converter) end end |