Class: RuCaptcha::Configuration

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

Instance Attribute Summary collapse

Instance Attribute Details

#cache_storeObject

Store Captcha code where, this config more like Rails config.cache_store default: Rails application config.cache_store



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

def cache_store
  @cache_store
end

#difficultyObject

Hard mode, default: 5, allows: [1..10]



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

def difficulty
  @difficulty
end

#expires_inObject

rucaptcha expire time, default 2 minutes



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

def expires_in
  @expires_in
end

#formatObject

Image format allow: [‘jpeg’, ‘png’, ‘webp’], default: ‘png’



17
18
19
# File 'lib/rucaptcha/configuration.rb', line 17

def format
  @format
end

#lengthObject

Chars length: default 5, allows: [3..7]



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

def length
  @length
end

#lineObject

Enable or disable strikethrough lines on captcha image, default: true



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

def line
  @line
end

#mount_pathObject

custom rucaptcha mount path, default: ‘/rucaptcha’



21
22
23
# File 'lib/rucaptcha/configuration.rb', line 21

def mount_path
  @mount_path
end

#noiseObject

Enable or disable noise on captcha image, default: false



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

def noise
  @noise
end

#skip_cache_store_checkObject

skip_cache_store_check, default: false



19
20
21
# File 'lib/rucaptcha/configuration.rb', line 19

def skip_cache_store_check
  @skip_cache_store_check
end