Class: SpamProtect::Config

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

Overview

Configuration object for the gem

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



35
36
37
38
39
40
41
42
43
44
# File 'lib/spam_protect.rb', line 35

def initialize
  @honeypot_field = :hp_phone
  @timestamp_field = :hp_ts
  @honeypot_class = "sp_hp"
  @wrapper_class = "spam_protect"
  @require_js = true
  @min_seconds = 2
  @signature_secret = nil
  @signature_expiry = 6.hours
end

Instance Attribute Details

#honeypot_classObject

Returns the value of attribute honeypot_class.



31
32
33
# File 'lib/spam_protect.rb', line 31

def honeypot_class
  @honeypot_class
end

#honeypot_fieldObject

Returns the value of attribute honeypot_field.



31
32
33
# File 'lib/spam_protect.rb', line 31

def honeypot_field
  @honeypot_field
end

#min_secondsObject

Returns the value of attribute min_seconds.



31
32
33
# File 'lib/spam_protect.rb', line 31

def min_seconds
  @min_seconds
end

#require_jsObject

Returns the value of attribute require_js.



31
32
33
# File 'lib/spam_protect.rb', line 31

def require_js
  @require_js
end

#signature_expiryObject

Returns the value of attribute signature_expiry.



31
32
33
# File 'lib/spam_protect.rb', line 31

def signature_expiry
  @signature_expiry
end

#signature_secretObject

Returns the value of attribute signature_secret.



31
32
33
# File 'lib/spam_protect.rb', line 31

def signature_secret
  @signature_secret
end

#timestamp_fieldObject

Returns the value of attribute timestamp_field.



31
32
33
# File 'lib/spam_protect.rb', line 31

def timestamp_field
  @timestamp_field
end

#wrapper_classObject

Returns the value of attribute wrapper_class.



31
32
33
# File 'lib/spam_protect.rb', line 31

def wrapper_class
  @wrapper_class
end