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