Class: SendGrid::SpamCheck
- Inherits:
-
Object
- Object
- SendGrid::SpamCheck
- Defined in:
- lib/sendgrid/helpers/mail/spam_check.rb
Instance Attribute Summary collapse
-
#enable ⇒ Object
Returns the value of attribute enable.
-
#post_to_url ⇒ Object
Returns the value of attribute post_to_url.
-
#threshold ⇒ Object
Returns the value of attribute threshold.
Instance Method Summary collapse
-
#initialize(enable: nil, threshold: nil, post_to_url: nil) ⇒ SpamCheck
constructor
A new instance of SpamCheck.
- #to_json ⇒ Object
Constructor Details
#initialize(enable: nil, threshold: nil, post_to_url: nil) ⇒ SpamCheck
Returns a new instance of SpamCheck.
7 8 9 10 11 |
# File 'lib/sendgrid/helpers/mail/spam_check.rb', line 7 def initialize(enable: nil, threshold: nil, post_to_url: nil) @enable = enable @threshold = threshold @post_to_url = post_to_url end |
Instance Attribute Details
#enable ⇒ Object
Returns the value of attribute enable.
5 6 7 |
# File 'lib/sendgrid/helpers/mail/spam_check.rb', line 5 def enable @enable end |
#post_to_url ⇒ Object
Returns the value of attribute post_to_url.
5 6 7 |
# File 'lib/sendgrid/helpers/mail/spam_check.rb', line 5 def post_to_url @post_to_url end |
#threshold ⇒ Object
Returns the value of attribute threshold.
5 6 7 |
# File 'lib/sendgrid/helpers/mail/spam_check.rb', line 5 def threshold @threshold end |
Instance Method Details
#to_json ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/sendgrid/helpers/mail/spam_check.rb', line 13 def to_json(*) { 'enable' => enable, 'threshold' => threshold, 'post_to_url' => post_to_url }.delete_if { |_, value| value.to_s.strip == '' } end |