lib/grumlin/client.rb in grumlin-0.14.1 vs lib/grumlin/client.rb in grumlin-0.14.2
- old
+ new
@@ -49,11 +49,11 @@
@request_dispatcher = nil
@transport = nil
end
def connect
- raise "ClientClosed" if @closed
+ raise ClientClosedError if @closed
@transport = build_transport
response_channel = @transport.connect
@request_dispatcher = RequestDispatcher.new
@response_task = @parent.async do
@@ -111,13 +111,16 @@
def inspect
"<#{self.class} url=#{@url} connected=#{connected?}>"
end
- alias to_s inspect
+ def to_s
+ inspect
+ end
private
+ # This might be overridden in successors
def build_transport
Transport.new(@url, parent: @parent, **@client_options)
end
def to_query(bytecode)