Sha256: dbf724c1749944febf02426ff3747f3683bce662da87bb0dac8d11b748a866ae
Contents?: true
Size: 825 Bytes
Versions: 8
Compression:
Stored size: 825 Bytes
Contents
module Protobuf module Rpc class SocketRunner private attr_accessor :server public 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 fail "Cannot parser Socket Server - server options" end self.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
8 entries across 8 versions & 2 rubygems