Sha256: 55b329e29fd08860540c63431473cf5a5c0697a1b1a7f4acf5862231f38cb50c
Contents?: true
Size: 769 Bytes
Versions: 54
Compression:
Stored size: 769 Bytes
Contents
module Protobuf module Rpc class SocketRunner def initialize(options) @options = case when options.is_a?(OpenStruct) then options.marshal_dump when options.is_a?(Hash) then options when options.respond_to?(:to_hash) then options.to_hash else raise "Cannot parser Socket Server - server options" end @server = ::Protobuf::Rpc::Socket::Server.new(@options) end def run yield if block_given? @server.run end def running? @server.running? end def stop @server.stop end end end end
Version data entries
54 entries across 54 versions & 2 rubygems