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