Class: SpamProtect::Policies::HoneypotPolicy

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

Instance Method Summary collapse

Methods inherited from BasePolicy

#invalid?

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

Returns:

  • (Boolean)


10
11
12
# File 'lib/spam_protect/policies/honeypot_policy.rb', line 10

def valid?
  @value.nil? || @value.to_s.strip.empty?
end