Class: Frequencyio::Channel
- Inherits:
-
Object
- Object
- Frequencyio::Channel
- Defined in:
- lib/frequencyio/channel.rb
Instance Attribute Summary collapse
-
#channel_id ⇒ Object
Returns the value of attribute channel_id.
-
#token ⇒ Object
Returns the value of attribute token.
Instance Method Summary collapse
-
#event(message) ⇒ Object
Sends an event to the current channel.
-
#initialize(id, token) ⇒ Channel
constructor
A new instance of Channel.
Constructor Details
#initialize(id, token) ⇒ Channel
Returns a new instance of Channel.
7 8 9 10 |
# File 'lib/frequencyio/channel.rb', line 7 def initialize(id, token) @channel_id = id @token = token end |
Instance Attribute Details
#channel_id ⇒ Object
Returns the value of attribute channel_id.
5 6 7 |
# File 'lib/frequencyio/channel.rb', line 5 def channel_id @channel_id end |
#token ⇒ Object
Returns the value of attribute token.
5 6 7 |
# File 'lib/frequencyio/channel.rb', line 5 def token @token end |
Instance Method Details
#event(message) ⇒ Object
Sends an event to the current channel
15 16 17 |
# File 'lib/frequencyio/channel.rb', line 15 def event() Freqnecyio.event(@channel_id, @token, ) end |