Module: PolypassAlphaNumeric
- Included in:
- Polypass::AlphaNumeric
- Defined in:
- lib/polypass/alpha_numeric.rb
Overview
Polypass::AlphaNumberic Class methods
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/polypass/alpha_numeric.rb', line 9 def create case @output_type when 'stdout' random_element(random_sample_set('alphanumeric', @length)) when 'json' output_json({ 'password' => random_element(random_sample_set('alphanumeric', @length)) }) when 'yaml' output_yaml({ 'password' => random_element(random_sample_set('alphanumeric', @length)) }) end end |
#initialize(length = 32, output_type = 'stdout') ⇒ Object
5 6 7 |
# File 'lib/polypass/alpha_numeric.rb', line 5 def initialize(length = 32, output_type = 'stdout') super(length, output_type) end |