Class: FractionalIndexer::Configuration
- Inherits:
-
Object
- Object
- FractionalIndexer::Configuration
- Defined in:
- lib/fractional_indexer/configuration.rb
Constant Summary collapse
- DIGITS_LIST =
allow only ASCII characters
{ base_10: ("0".."9").to_a, base_62: ("0".."9").to_a + ("A".."Z").to_a + ("a".."z").to_a, base_94: ("!".."~").to_a, }.freeze
Instance Attribute Summary collapse
-
#base ⇒ Object
writeonly
Sets the attribute base.
Instance Method Summary collapse
Instance Attribute Details
#base=(value) ⇒ Object
Sets the attribute base
5 6 7 |
# File 'lib/fractional_indexer/configuration.rb', line 5 def base=(value) @base = value end |
Instance Method Details
#digits ⇒ Object
14 15 16 |
# File 'lib/fractional_indexer/configuration.rb', line 14 def digits DIGITS_LIST[base] || DIGITS_LIST[:base_62] end |