Class: RakeSecrets::Types::Alphabetic
- Inherits:
-
Object
- Object
- RakeSecrets::Types::Alphabetic
- Defined in:
- lib/rake_secrets/types/alphabetic.rb
Constant Summary collapse
- LOWERCASE_CHARACTERS =
('a'..'z').to_a
- UPPERCASE_CHARACTERS =
('A'..'Z').to_a
Instance Method Summary collapse
- #generate ⇒ Object
-
#initialize(opts = {}) ⇒ Alphabetic
constructor
A new instance of Alphabetic.
Constructor Details
#initialize(opts = {}) ⇒ Alphabetic
Returns a new instance of Alphabetic.
11 12 13 14 15 16 |
# File 'lib/rake_secrets/types/alphabetic.rb', line 11 def initialize(opts = {}) @delegate = CharacterSet.new( character_set(opts[:case]), length: opts[:length] || 32 ) end |
Instance Method Details
#generate ⇒ Object
18 19 20 |
# File 'lib/rake_secrets/types/alphabetic.rb', line 18 def generate @delegate.generate end |