Class: HashIds::Configuration
- Inherits:
-
Object
- Object
- HashIds::Configuration
- Defined in:
- lib/hash_ids/configuration.rb
Instance Attribute Summary collapse
-
#alphabet ⇒ Object
Returns the value of attribute alphabet.
-
#min_hash_length ⇒ Object
Returns the value of attribute min_hash_length.
-
#salt ⇒ Object
Returns the value of attribute salt.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/hash_ids/configuration.rb', line 6 def initialize # the encrypted id length @min_hash_length = 16 # the encrypting pool @alphabet = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890' # secret @salt = @alphabet end |
Instance Attribute Details
#alphabet ⇒ Object
Returns the value of attribute alphabet.
4 5 6 |
# File 'lib/hash_ids/configuration.rb', line 4 def alphabet @alphabet end |
#min_hash_length ⇒ Object
Returns the value of attribute min_hash_length.
4 5 6 |
# File 'lib/hash_ids/configuration.rb', line 4 def min_hash_length @min_hash_length end |
#salt ⇒ Object
Returns the value of attribute salt.
4 5 6 |
# File 'lib/hash_ids/configuration.rb', line 4 def salt @salt end |