Class: MongoMedia
- Inherits:
-
Object
- Object
- MongoMedia
- Defined in:
- lib/models/mongo_media.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#content_type ⇒ Object
Returns the value of attribute content_type.
-
#last_updated ⇒ Object
Returns the value of attribute last_updated.
Instance Method Summary collapse
-
#initialize(request = nil, params = nil) ⇒ MongoMedia
constructor
A new instance of MongoMedia.
Constructor Details
#initialize(request = nil, params = nil) ⇒ MongoMedia
Returns a new instance of MongoMedia.
6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/models/mongo_media.rb', line 6 def initialize request=nil, params=nil if (request != nil) if (request_is_multipart_form(params)) populate_from_multipart params elsif(request_is_octet_stream(params)) populate_from_octet_stream(params, request) else populate_from_plain request end @last_updated = Time.now.httpdate end end |
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
4 5 6 |
# File 'lib/models/mongo_media.rb', line 4 def body @body end |
#content_type ⇒ Object
Returns the value of attribute content_type.
4 5 6 |
# File 'lib/models/mongo_media.rb', line 4 def content_type @content_type end |
#last_updated ⇒ Object
Returns the value of attribute last_updated.
4 5 6 |
# File 'lib/models/mongo_media.rb', line 4 def last_updated @last_updated end |