Class: Viewpoint::EWS::Template::Message
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- Viewpoint::EWS::Template::Message
- Defined in:
- lib/ews/templates/message.rb
Direct Known Subclasses
Instance Method Summary collapse
- #has_attachments? ⇒ Boolean
-
#initialize(opts = {}) ⇒ Message
constructor
A new instance of Message.
-
#to_ews ⇒ Object
Format this object for EWS backend consumption.
Constructor Details
#initialize(opts = {}) ⇒ Message
Returns a new instance of Message.
5 6 7 8 |
# File 'lib/ews/templates/message.rb', line 5 def initialize(opts = {}) super opts.clone init_defaults! end |
Instance Method Details
#has_attachments? ⇒ Boolean
16 17 18 |
# File 'lib/ews/templates/message.rb', line 16 def !(.empty? && .empty? && .empty?) end |
#to_ews ⇒ Object
Format this object for EWS backend consumption.
11 12 13 14 |
# File 'lib/ews/templates/message.rb', line 11 def to_ews ews_opts, msg = to_ews_basic ews_opts.merge({items: [{message: msg}]}) end |