Class: Zm::Client::Message::Body

Inherits:
Object
  • Object
show all
Defined in:
lib/zm/client/message/message.rb

Overview

content fo an email

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#htmlObject

Returns the value of attribute html.



113
114
115
# File 'lib/zm/client/message/message.rb', line 113

def html
  @html
end

#textObject

Returns the value of attribute text.



113
114
115
# File 'lib/zm/client/message/message.rb', line 113

def text
  @text
end

Instance Method Details

#html_jsnsObject



119
120
121
# File 'lib/zm/client/message/message.rb', line 119

def html_jsns
  { ct: 'text/html', content: { _content: @html } }
end

#text_jsnsObject



115
116
117
# File 'lib/zm/client/message/message.rb', line 115

def text_jsns
  { ct: 'text/plain', content: { _content: @text } }
end

#to_jsnsObject



123
124
125
126
127
128
129
130
# File 'lib/zm/client/message/message.rb', line 123

def to_jsns
  [
    {
      ct: 'multipart/alternative',
      mp: [text_jsns, html_jsns]
    }
  ]
end