Skip to content

aovertus/tokenize_attributes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TokenizeAttributes

TokenizeAttributes allows to define a tokenized attribute.

A before validation is generate on the attribute to set a tokenized value on the attribute

Installation

  gem 'tokenize_attributes', '~> 0.1.1'

Configuration

TokenizeAttributes.configure do |config|
  config.tokenizer = proc { SecureRandom.hex }
end

Usage

Tokenized attributes

class Object
    tokenized_attributes :attrb1, :attrb2
end

Override tokenizer proc

class Object
    tokenized_attributes :attrb1, :attrb2, proc { SecureRandom.uuid }
end

Reset Attrb

object = Object.new
object.reset_tokenization_for_attrb

License

The gem is available as open source under the terms of the MIT License.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages