Module: DataRedactor::Refinements
- Defined in:
- lib/data_redactor/refinements.rb
Overview
Opt-in refinements that add a ‘#redact` method to `String`, `Hash`, and `Array` as sugar over redact / redact_deep.
Refinements are lexically scoped: ‘#redact` exists only in files that `using DataRedactor::Refinements`, so loading this file never pollutes the core classes globally. Apps that don’t opt in are unaffected, and there is no collision risk with other libraries’ ‘String#redact`.
‘DataRedactor.redact` remains the primary API; this is convenience only.