Exception: PiiSafeSchema::ConfigurationError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/pii_safe_schema/configuration.rb

Constant Summary collapse

IGNORE_MSG =
<<~HEREDOC.freeze
  ignore must be a hash where the values are
  symbols or arrays of symbols.
  e.g. ignore = { some_table: :* } ##ignore the whole some_table
  or   ignore = { some_table: [:some_column, :some_other_column] }
HEREDOC
DD_CLIENT_MSG =
<<~HEREDOC.freeze
  Datadog client must be implement #event(title, text, opts = {})

  Consider using dogstatsd-ruby gem and pass in Datadog::Statsd.new(...)
  as the client.
HEREDOC

Instance Method Summary collapse

Constructor Details

#initialize(problem) ⇒ ConfigurationError

Returns a new instance of ConfigurationError.



79
80
81
82
83
84
85
86
87
88
89
90
# File 'lib/pii_safe_schema/configuration.rb', line 79

def initialize(problem)
  super(
    case problem
    when :ignore
      IGNORE_MSG
    when :datadog_client
      DD_CLIENT_MSG
    else
      problem
    end
  )
end