Sha256: 42f82eb174bfc3c160240cab5e9fd319d8db5426f80e7adc57f80d5a91984f5d

Contents?: true

Size: 196 Bytes

Versions: 9

Compression:

Stored size: 196 Bytes

Contents

module Cascade
  module ComplexFields
    class Boolean
      TRUE_VALUES = ["True", "true", "x", "+", true]

      def call(value)
        TRUE_VALUES.include?(value)
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
cascade-rb-0.2.3 lib/cascade/complex_fields/boolean.rb
cascade-rb-0.2.2 lib/cascade/complex_fields/boolean.rb
cascade-rb-0.2.1 lib/cascade/complex_fields/boolean.rb
cascade-rb-0.2.0 lib/cascade/complex_fields/boolean.rb
cascade-rb-0.1.5 lib/cascade/complex_fields/boolean.rb
cascade-rb-0.1.4 lib/cascade/complex_fields/boolean.rb
cascade-rb-0.1.2 lib/cascade/complex_fields/boolean.rb
cascade-rb-0.1.1 lib/cascade/complex_fields/boolean.rb
cascade-rb-0.1.0 lib/cascade/complex_fields/boolean.rb