Class: SpamProtect::Policies::CookiePolicy
- Inherits:
-
BasePolicy
- Object
- BasePolicy
- SpamProtect::Policies::CookiePolicy
- Defined in:
- lib/spam_protect/policies/cookie_policy.rb
Instance Method Summary collapse
-
#initialize(cookie) ⇒ CookiePolicy
constructor
A new instance of CookiePolicy.
- #valid? ⇒ Boolean
Methods inherited from BasePolicy
Constructor Details
#initialize(cookie) ⇒ CookiePolicy
6 7 8 |
# File 'lib/spam_protect/policies/cookie_policy.rb', line 6 def initialize() = end |
Instance Method Details
#valid? ⇒ Boolean
10 11 12 13 14 15 16 17 |
# File 'lib/spam_protect/policies/cookie_policy.rb', line 10 def valid? unless SpamProtect.config.require_js return true end # Decryption/validity is checked elsewhere .to_s.strip.present? end |