Class: Inbox::Message
Direct Known Subclasses
Draft
Instance Method Summary
collapse
#==, #as_json, collection_name, #destroy, #initialize, #save!, #update, #url
#time_attr_accessor
Methods included from Parameters
included, #parameters
Instance Method Details
#inflate(json) ⇒ Object
19
20
21
22
23
24
|
# File 'lib/message.rb', line 19
def inflate(json)
super
@to ||= []
@cc ||= []
@bcc ||= []
end
|
#raw ⇒ Object
30
31
32
33
34
35
36
37
38
39
|
# File 'lib/message.rb', line 30
def raw
model = nil
collection = RestfulModelCollection.new(Message, @_api, @namespace_id, {:message_id=>@id})
RestClient.get("#{collection.url}/#{id}/rfc2822"){ |response,request,result|
json = Inbox.interpret_response(result, response, {:expected_class => Object})
model = Rfc2822.new(@_api)
model.inflate(json)
}
model
end
|