Class: SendGrid::Footer

Inherits:
Object
  • Object
show all
Defined in:
lib/sendgrid/helpers/mail/mail.rb

Instance Method Summary collapse

Constructor Details

#initialize(enable: nil, text: nil, html: nil) ⇒ Footer

Returns a new instance of Footer.


278
279
280
281
282
# File 'lib/sendgrid/helpers/mail/mail.rb', line 278

def initialize(enable: nil, text: nil, html: nil)
  @enable = enable
  @text = text
  @html = html
end

Instance Method Details

#enableObject


288
289
290
# File 'lib/sendgrid/helpers/mail/mail.rb', line 288

def enable
  @enable
end

#enable=(enable) ⇒ Object


284
285
286
# File 'lib/sendgrid/helpers/mail/mail.rb', line 284

def enable=(enable)
  @enable = enable
end

#htmlObject


304
305
306
# File 'lib/sendgrid/helpers/mail/mail.rb', line 304

def html
  @html
end

#html=(html) ⇒ Object


300
301
302
# File 'lib/sendgrid/helpers/mail/mail.rb', line 300

def html=(html)
  @html = html
end

#textObject


296
297
298
# File 'lib/sendgrid/helpers/mail/mail.rb', line 296

def text
  @text
end

#text=(text) ⇒ Object


292
293
294
# File 'lib/sendgrid/helpers/mail/mail.rb', line 292

def text=(text)
  @text = text
end

#to_jsonObject


308
309
310
311
312
313
314
# File 'lib/sendgrid/helpers/mail/mail.rb', line 308

def to_json(*)
  {
    'enable' => self.enable,
    'text' => self.text,
    'html' => self.html
  }.delete_if { |_, value| value.to_s.strip == '' }
end