Sha256: 63f53be1eb45e8a098246ac07c473ac68c7c2522b32f25787f5f3eead6519c95

Contents?: true

Size: 585 Bytes

Versions: 6

Compression:

Stored size: 585 Bytes

Contents

# frozen_string_literal: true

module Masking
  class Config
    class TargetColumns
      class Method
        class Boolean
          def initialize(value)
            @boolean = value
          end

          def call
            boolean_format.to_s
          end

          private

          attr_reader :boolean

          # NOTE: 11.1.1 Numeric Type Overview, chapter BOOL, BOOLEAN
          #       https://dev.mysql.com/doc/refman/8.0/en/numeric-type-overview.html
          def boolean_format
            boolean ? 1 : 0
          end
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
masking-1.1.0 lib/masking/config/target_columns/method/boolean.rb
masking-1.0.1 lib/masking/config/target_columns/method/boolean.rb
masking-1.0.0 lib/masking/config/target_columns/method/boolean.rb
masking-0.0.3 lib/masking/config/target_columns/method/boolean.rb
masking-0.0.2 lib/masking/config/target_columns/method/boolean.rb
masking-0.0.1 lib/masking/config/target_columns/method/boolean.rb