Class: Nylas::ExpandedMessage

Inherits:
Message show all
Defined in:
lib/message.rb

Instance Attribute Summary collapse

Attributes inherited from RestfulModel

#raw_json

Instance Method Summary collapse

Methods inherited from Message

#as_json, #expanded, #files, #files?, #raw

Methods included from ReadUnreadMethods

#mark_as_read!, #mark_as_unread!, #star!, #unstar!, #update_param!

Methods inherited from RestfulModel

#==, #as_json, collection_name, #destroy, #initialize, #save!, #update, #url

Methods included from TimeAttrAccessor

#time_attr_accessor

Methods included from Parameters

included, #parameters

Constructor Details

This class inherits a constructor from Nylas::RestfulModel

Instance Attribute Details

#in_reply_toObject (readonly)

Returns the value of attribute in_reply_to.



107
108
109
# File 'lib/message.rb', line 107

def in_reply_to
  @in_reply_to
end

#message_idObject (readonly)

override inflate because expanded messages have some special parameters like In-Reply-To and Message-Id.



106
107
108
# File 'lib/message.rb', line 106

def message_id
  @message_id
end

#referencesObject (readonly)

Returns the value of attribute references.



108
109
110
# File 'lib/message.rb', line 108

def references
  @references
end

Instance Method Details

#inflate(json) ⇒ Object



110
111
112
113
114
115
# File 'lib/message.rb', line 110

def inflate(json)
  super
  @message_id = json['headers']['Message-Id']
  @in_reply_to = json['headers']['In-Reply-To']
  @references = json['headers']['References']
end