class SendGrid::Content
Attributes
type[RW]
value[RW]
Public Class Methods
new(type: nil, value: nil)
click to toggle source
# File lib/sendgrid/helpers/mail/content.rb, line 7 def initialize(type: nil, value: nil) @type = type @value = value end
Public Instance Methods
to_json(*)
click to toggle source
# File lib/sendgrid/helpers/mail/content.rb, line 12 def to_json(*) { 'type' => type, 'value' => value }.delete_if { |_, value| value.to_s.strip == '' } end