Class: MimeType::T
- Inherits:
-
Struct
- Object
- Struct
- MimeType::T
- Defined in:
- lib/mimetype.rb
Overview
Note:
this is universal
– Creates a new struct for wrapping out MimeTypes –
Class Method Summary collapse
Instance Method Summary collapse
-
#to_msgpack_ext ⇒ String
– Converts MimeType::T to pack –.
Class Method Details
.from_msgpack_ext(o) ⇒ MimeType::T
Note:
takes a packed array, unpacks to MimeType::T
– –
41 42 43 |
# File 'lib/mimetype.rb', line 41 def from_msgpack_ext(o) new(*MessagePack.unpack(o)) end |
Instance Method Details
#to_msgpack_ext ⇒ String
Note:
converts to array then to pack
– Converts MimeType::T to pack –
29 30 31 |
# File 'lib/mimetype.rb', line 29 def to_msgpack_ext to_a.to_msgpack end |