Class: Grape::Entity
- Inherits:
-
Object
- Object
- Grape::Entity
- Defined in:
- lib/grape/msgpack.rb
Instance Method Summary collapse
Instance Method Details
#to_msgpack(pack = nil) ⇒ Object
47 48 49 50 51 52 53 |
# File 'lib/grape/msgpack.rb', line 47 def to_msgpack(pack = nil) if pack pack.write(serializable_hash) else MessagePack.pack(serializable_hash) end end |