Class: Polypass

Inherits:
Object
  • Object
show all
Includes:
PolypassHelpers
Defined in:
lib/polypass.rb,
lib/polypass/version.rb

Overview

The polymorphous password generator

Direct Known Subclasses

AlphaNumeric, AlphaSymbol, NaturalLanguage

Defined Under Namespace

Classes: AlphaNumeric, AlphaSymbol, NaturalLanguage

Constant Summary collapse

VERSION =
'1.0.0'

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from PolypassHelpers

#alphanumeric_chars, #alphasymbol_chars, #output_json, #output_yaml, #random_element, #random_number, #random_sample_chars, #random_sample_set

Constructor Details

#initialize(length = 32, output_type = 'stdout') ⇒ Polypass

Returns a new instance of Polypass.



17
18
19
20
# File 'lib/polypass.rb', line 17

def initialize(length = 32, output_type = 'stdout')
  @length = length.to_i
  @output_type = output_type.to_s
end

Instance Attribute Details

#lengthObject

Returns the value of attribute length.



15
16
17
# File 'lib/polypass.rb', line 15

def length
  @length
end

#output_typeObject

Returns the value of attribute output_type.



15
16
17
# File 'lib/polypass.rb', line 15

def output_type
  @output_type
end