Class: Twitch::Bot::Message::SlowMode
- Defined in:
- lib/twitch/bot/message.rb
Overview
This class stores the details of a SlowMode event.
Instance Attribute Summary collapse
-
#channel ⇒ Object
readonly
Returns the value of attribute channel.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Attributes inherited from Event
Instance Method Summary collapse
- #enabled? ⇒ Boolean
-
#initialize(status:, channel:) ⇒ SlowMode
constructor
A new instance of SlowMode.
Constructor Details
#initialize(status:, channel:) ⇒ SlowMode
Returns a new instance of SlowMode.
82 83 84 85 86 |
# File 'lib/twitch/bot/message.rb', line 82 def initialize(status:, channel:) @status = status @channel = channel super(type: :slow_mode) end |
Instance Attribute Details
#channel ⇒ Object (readonly)
Returns the value of attribute channel.
80 81 82 |
# File 'lib/twitch/bot/message.rb', line 80 def channel @channel end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
80 81 82 |
# File 'lib/twitch/bot/message.rb', line 80 def status @status end |
Instance Method Details
#enabled? ⇒ Boolean
88 89 90 |
# File 'lib/twitch/bot/message.rb', line 88 def enabled? status.to_i.positive? end |