lib/anony/model_config.rb
# Use the overwrite strategy to configure rules for individual fields. This method is
# incompatible with the destroy strategy.
#
# This method takes a configuration block. All configuration is applied to
# Anony::Strategies::Overwrite.
#
# @see Anony::Strategies::Overwrite
#
# @example
#   anonymise do
#     overwrite do
#       hex :first_name
#     end
#   end
Use the overwrite strategy to configure rules for individual fields. This method is
incompatible with the destroy strategy.

This method takes a configuration block. All configuration is applied to
Anony::Strategies::Overwrite.
Use the overwrite strategy to configure rules for individual fields . This method is incompatible with the destroy strategy . This method takes a configuration block . All configuration is applied to Anony :: Strategies :: Overwrite .
def overwrite(&block)
      unless @strategy.is_a?(UndefinedStrategy)
        raise ArgumentError, "Cannot specify :overwrite when another strategy already defined"
      end
      @strategy = Strategies::Overwrite.new(@model_class, &block)
    end
def overwrite ( & block ) unless @strategy . is_a? ( UndefinedStrategy ) raise ArgumentError , "Cannot specify :overwrite when another strategy already defined" end @strategy = Strategies :: Overwrite . new ( @model_class , & block ) end
Use the overwrite strategy to configure rules for individual fields.
Use the overwrite strategy to configure rules for individual fields .
block
<not_specific>
see
None
example
anonymise do overwrite do hex :first_name end end
anonymise do overwrite do hex : first_name end end