Class: Bento::Spam
- Inherits:
-
Object
- Object
- Bento::Spam
- Defined in:
- lib/bento/resources/spam.rb
Class Method Summary collapse
-
.risky?(email) ⇒ Boolean
Example: Bento::Spam.risky?(‘test@bentonow.com’).
- .valid?(email) ⇒ Boolean
Class Method Details
permalink .risky?(email) ⇒ Boolean
Example: Bento::Spam.risky?(‘test@bentonow.com’)
15 16 17 |
# File 'lib/bento/resources/spam.rb', line 15 def risky?(email) !self.valid?(email) end |
permalink .valid?(email) ⇒ Boolean
4 5 6 7 8 9 10 11 12 |
# File 'lib/bento/resources/spam.rb', line 4 def valid?(email) payload = { email: email } response = client.post('api/v1/experimental/validation', payload.to_json) return response['valid'] end |