Class: FuckBot::Client
- Inherits:
-
Object
- Object
- FuckBot::Client
- Defined in:
- lib/fuck_bot/client.rb
Instance Attribute Summary collapse
-
#store ⇒ Object
readonly
Returns the value of attribute store.
-
#token ⇒ Object
readonly
Returns the value of attribute token.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
-
#user ⇒ Object
readonly
Returns the value of attribute user.
-
#ws ⇒ Object
readonly
Returns the value of attribute ws.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Client
constructor
A new instance of Client.
- #run ⇒ Object
Constructor Details
Instance Attribute Details
#store ⇒ Object (readonly)
Returns the value of attribute store.
3 4 5 |
# File 'lib/fuck_bot/client.rb', line 3 def store @store end |
#token ⇒ Object (readonly)
Returns the value of attribute token.
3 4 5 |
# File 'lib/fuck_bot/client.rb', line 3 def token @token end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
3 4 5 |
# File 'lib/fuck_bot/client.rb', line 3 def url @url end |
#user ⇒ Object (readonly)
Returns the value of attribute user.
3 4 5 |
# File 'lib/fuck_bot/client.rb', line 3 def user @user end |
#ws ⇒ Object (readonly)
Returns the value of attribute ws.
3 4 5 |
# File 'lib/fuck_bot/client.rb', line 3 def ws @ws end |
Instance Method Details
#run ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/fuck_bot/client.rb', line 13 def run @ws = Faye::WebSocket::Client.new(@url) @ws.on(:open, on_open) @ws.on(:message, ) @ws.on(:close, on_close) end |