Class: EncodedId::Rails::Configuration
- Inherits:
-
Object
- Object
- EncodedId::Rails::Configuration
- Defined in:
- lib/encoded_id/rails/configuration.rb
Overview
Configuration class for initializer
Instance Attribute Summary collapse
-
#alphabet ⇒ Object
Returns the value of attribute alphabet.
-
#character_group_size ⇒ Object
Returns the value of attribute character_group_size.
-
#group_separator ⇒ Object
Returns the value of attribute group_separator.
-
#id_length ⇒ Object
Returns the value of attribute id_length.
-
#salt ⇒ Object
Returns the value of attribute salt.
-
#slugged_id_separator ⇒ Object
Returns the value of attribute slugged_id_separator.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
14 15 16 17 18 19 20 |
# File 'lib/encoded_id/rails/configuration.rb', line 14 def initialize @character_group_size = 4 @group_separator = "-" @alphabet = ::EncodedId::Alphabet.modified_crockford @id_length = 8 @slugged_id_separator = "--" end |
Instance Attribute Details
#alphabet ⇒ Object
Returns the value of attribute alphabet.
7 8 9 |
# File 'lib/encoded_id/rails/configuration.rb', line 7 def alphabet @alphabet end |
#character_group_size ⇒ Object
Returns the value of attribute character_group_size.
7 8 9 |
# File 'lib/encoded_id/rails/configuration.rb', line 7 def character_group_size @character_group_size end |
#group_separator ⇒ Object
Returns the value of attribute group_separator.
7 8 9 |
# File 'lib/encoded_id/rails/configuration.rb', line 7 def group_separator @group_separator end |
#id_length ⇒ Object
Returns the value of attribute id_length.
7 8 9 |
# File 'lib/encoded_id/rails/configuration.rb', line 7 def id_length @id_length end |
#salt ⇒ Object
Returns the value of attribute salt.
7 8 9 |
# File 'lib/encoded_id/rails/configuration.rb', line 7 def salt @salt end |
#slugged_id_separator ⇒ Object
Returns the value of attribute slugged_id_separator.
7 8 9 |
# File 'lib/encoded_id/rails/configuration.rb', line 7 def slugged_id_separator @slugged_id_separator end |