Class: Asciiptcha::Configuration

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.


15
16
17
18
19
# File 'lib/asciiptcha/configuration.rb', line 15

def initialize
	@encryption_key = nil
	@captcha_length = 8
	@available_fonts = [ 'basic', 'banner4','colossal' ]
end

Instance Attribute Details

#available_fontsObject

Available fonts - allowed fonts for captcha For list see artii -l command for list of available fonts or www.figlet.org/examples.html


13
14
15
# File 'lib/asciiptcha/configuration.rb', line 13

def available_fonts
  @available_fonts
end

#captcha_lengthObject

Captcha length - number of characters in captcha


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

def captcha_length
  @captcha_length
end

#encryption_keyObject

Encryption key - used for encrypting captcha key in forms !!! MUST BE VALID RANDOM AES 256 KEY !!!


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

def encryption_key
  @encryption_key
end