lib/dry/transformer/coercions.rb in dry-transformer-0.1.1 vs lib/dry/transformer/coercions.rb in dry-transformer-1.0.0

- old
+ new

@@ -1,21 +1,21 @@ # frozen_string_literal: true -require 'date' -require 'time' -require 'bigdecimal' -require 'bigdecimal/util' +require "date" +require "time" +require "bigdecimal" +require "bigdecimal/util" module Dry module Transformer # Coercion functions for common types # # @api public module Coercions extend Registry - TRUE_VALUES = [true, 1, '1', 'on', 't', 'true', 'y', 'yes'].freeze - FALSE_VALUES = [false, 0, '0', 'off', 'f', 'false', 'n', 'no', nil].freeze + TRUE_VALUES = [true, 1, "1", "on", "t", "true", "y", "yes"].freeze + FALSE_VALUES = [false, 0, "0", "off", "f", "false", "n", "no", nil].freeze BOOLEAN_MAP = Hash[ TRUE_VALUES.product([true]) + FALSE_VALUES.product([false]) ].freeze