Module: ProtoPharm::MetadataSerializers::Gruf
- Defined in:
- lib/proto_pharm/metadata_serializers/gruf.rb
Class Method Summary collapse
Class Method Details
.serialize(code:, app_code: nil, **metadata) ⇒ Object
24 25 26 27 28 29 30 31 32 33 |
# File 'lib/proto_pharm/metadata_serializers/gruf.rb', line 24 def serialize(code:, app_code: nil, **) { **.fetch(:metadata, {}), }.tap do |hash| if ::Gruf. e = ::Gruf::Error.new(code: code, app_code: app_code, **) hash[::Gruf..to_sym] = e.serialize end end end |