Class: SpamProtect::Config
- Inherits:
-
Object
- Object
- SpamProtect::Config
- Defined in:
- lib/spam_protect.rb
Overview
Configuration object for the gem
Instance Attribute Summary collapse
-
#honeypot_class ⇒ Object
Returns the value of attribute honeypot_class.
-
#honeypot_field ⇒ Object
Returns the value of attribute honeypot_field.
-
#min_seconds ⇒ Object
Returns the value of attribute min_seconds.
-
#require_js ⇒ Object
Returns the value of attribute require_js.
-
#signature_expiry ⇒ Object
Returns the value of attribute signature_expiry.
-
#signature_secret ⇒ Object
Returns the value of attribute signature_secret.
-
#timestamp_field ⇒ Object
Returns the value of attribute timestamp_field.
-
#wrapper_class ⇒ Object
Returns the value of attribute wrapper_class.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
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 = :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_class ⇒ Object
Returns the value of attribute honeypot_class.
31 32 33 |
# File 'lib/spam_protect.rb', line 31 def honeypot_class @honeypot_class end |
#honeypot_field ⇒ Object
Returns the value of attribute honeypot_field.
31 32 33 |
# File 'lib/spam_protect.rb', line 31 def honeypot_field @honeypot_field end |
#min_seconds ⇒ Object
Returns the value of attribute min_seconds.
31 32 33 |
# File 'lib/spam_protect.rb', line 31 def min_seconds @min_seconds end |
#require_js ⇒ Object
Returns the value of attribute require_js.
31 32 33 |
# File 'lib/spam_protect.rb', line 31 def require_js @require_js end |
#signature_expiry ⇒ Object
Returns the value of attribute signature_expiry.
31 32 33 |
# File 'lib/spam_protect.rb', line 31 def signature_expiry @signature_expiry end |
#signature_secret ⇒ Object
Returns the value of attribute signature_secret.
31 32 33 |
# File 'lib/spam_protect.rb', line 31 def signature_secret @signature_secret end |
#timestamp_field ⇒ Object
Returns the value of attribute timestamp_field.
31 32 33 |
# File 'lib/spam_protect.rb', line 31 def end |
#wrapper_class ⇒ Object
Returns the value of attribute wrapper_class.
31 32 33 |
# File 'lib/spam_protect.rb', line 31 def wrapper_class @wrapper_class end |