Class: SpamProtect::Policies::HoneypotPolicy
- Inherits:
-
BasePolicy
- Object
- BasePolicy
- SpamProtect::Policies::HoneypotPolicy
- Defined in:
- lib/spam_protect/policies/honeypot_policy.rb
Instance Method Summary collapse
-
#initialize(value) ⇒ HoneypotPolicy
constructor
A new instance of HoneypotPolicy.
- #valid? ⇒ Boolean
Methods inherited from BasePolicy
Constructor Details
#initialize(value) ⇒ HoneypotPolicy
Returns a new instance of HoneypotPolicy.
6 7 8 |
# File 'lib/spam_protect/policies/honeypot_policy.rb', line 6 def initialize(value) @value = value end |
Instance Method Details
#valid? ⇒ Boolean
10 11 12 |
# File 'lib/spam_protect/policies/honeypot_policy.rb', line 10 def valid? @value.nil? || @value.to_s.strip.empty? end |