class Masking::Config::TargetColumns::Method::Boolean

Attributes

boolean[R]

Public Class Methods

new(value) click to toggle source
# File lib/masking/config/target_columns/method/boolean.rb, line 8
def initialize(value)
  @boolean = value
end

Public Instance Methods

call() click to toggle source
# File lib/masking/config/target_columns/method/boolean.rb, line 12
def call
  boolean_format.to_s
end

Private Instance Methods

boolean_format() click to toggle source

NOTE: 11.1.1 Numeric Type Overview, chapter BOOL, BOOLEAN

https://dev.mysql.com/doc/refman/8.0/en/numeric-type-overview.html
# File lib/masking/config/target_columns/method/boolean.rb, line 22
def boolean_format
  boolean ? 1 : 0
end