Skip to content

Commit

Permalink
Use def_delegators for text and binary.
Browse files Browse the repository at this point in the history
  • Loading branch information
dblock committed Aug 27, 2018
1 parent a8867bb commit d3140e9
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions lib/slack/real_time/concurrency/async.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,7 @@ module Concurrency
module Async
class Client < ::Async::WebSocket::Client
extend ::Forwardable
def_delegators :@driver, :on

def text(message)
@driver.text(message)
end

def binary(data)
@driver.binary(data)
end
def_delegators :@driver, :on, :text, :binary
end

class Socket < Slack::RealTime::Socket
Expand Down

1 comment on commit d3140e9

@ioquatix
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haha, good idea.

Please sign in to comment.