Class: NOBSPW::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/nobspw/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/nobspw/configuration.rb', line 14

def initialize
  @min_password_length      = 10
  @max_password_length      = 256
  @min_unique_characters    = 5
  @dictionary_path          = File.join(File.dirname(__FILE__), "..", "db", "dictionary.txt")
  @grep_path                = `which grep`.strip
  @use_ruby_grep            = !@grep_path.present?
  @domain_name              = nil
  @blacklist                = nil
  @validation_methods       = NOBSPW::ValidationMethods::DEFAULT_VALIDATION_METHODS
  @interrupt_validation_for = NOBSPW::ValidationMethods::INTERRUPT_VALIDATION_FOR
end

Instance Attribute Details

#blacklistObject

Returns the value of attribute blacklist.



10
11
12
# File 'lib/nobspw/configuration.rb', line 10

def blacklist
  @blacklist
end

#dictionary_pathObject

Returns the value of attribute dictionary_path.



6
7
8
# File 'lib/nobspw/configuration.rb', line 6

def dictionary_path
  @dictionary_path
end

#domain_nameObject

Returns the value of attribute domain_name.



9
10
11
# File 'lib/nobspw/configuration.rb', line 9

def domain_name
  @domain_name
end

#grep_pathObject

Returns the value of attribute grep_path.



7
8
9
# File 'lib/nobspw/configuration.rb', line 7

def grep_path
  @grep_path
end

#interrupt_validation_forObject

Returns the value of attribute interrupt_validation_for.



12
13
14
# File 'lib/nobspw/configuration.rb', line 12

def interrupt_validation_for
  @interrupt_validation_for
end

#max_password_lengthObject

Returns the value of attribute max_password_length.



4
5
6
# File 'lib/nobspw/configuration.rb', line 4

def max_password_length
  @max_password_length
end

#min_password_lengthObject

Returns the value of attribute min_password_length.



3
4
5
# File 'lib/nobspw/configuration.rb', line 3

def min_password_length
  @min_password_length
end

#min_unique_charactersObject

Returns the value of attribute min_unique_characters.



5
6
7
# File 'lib/nobspw/configuration.rb', line 5

def min_unique_characters
  @min_unique_characters
end

#use_ruby_grepObject

Returns the value of attribute use_ruby_grep.



8
9
10
# File 'lib/nobspw/configuration.rb', line 8

def use_ruby_grep
  @use_ruby_grep
end

#validation_methodsObject

Returns the value of attribute validation_methods.



11
12
13
# File 'lib/nobspw/configuration.rb', line 11

def validation_methods
  @validation_methods
end