gnapse/redis-attrs

View on GitHub
lib/redis-attrs/boolean.rb

Summary

Maintainability
A
0 mins
Test Coverage
class Redis
  module Attrs
    class Boolean < Scalar
      def deserialize(value)
        value.nil? ? nil : %w(true yes).include?(value.downcase)
      end
    end
  end
end