Method: GRPC::GenericService::Dsl#assert_can_marshal
- Defined in:
- src/ruby/lib/grpc/generic/service.rb
#assert_can_marshal(cls) ⇒ Object
123 124 125 126 127 128 129 130 131 132 |
# File 'src/ruby/lib/grpc/generic/service.rb', line 123 def assert_can_marshal(cls) cls = cls.type if cls.is_a? RpcDesc::Stream mth = unmarshal_class_method unless cls.methods.include? mth fail(ArgumentError, "#{cls} needs #{cls}.#{mth}") end mth = marshal_class_method return if cls.methods.include? mth fail(ArgumentError, "#{cls} needs #{cls}.#{mth}") end |