Class: Flexo::Events::ModeEvent
- Inherits:
-
Flexo::Event
- Object
- Flexo::Event
- Flexo::Events::ModeEvent
- Defined in:
- lib/flexo/events/mode.rb
Instance Attribute Summary collapse
-
#modes ⇒ Object
readonly
Returns the value of attribute modes.
Attributes inherited from Flexo::Event
Instance Method Summary collapse
- #channelmode? ⇒ Boolean (also: #chanmode?)
-
#initialize(*args) ⇒ ModeEvent
constructor
A new instance of ModeEvent.
- #usermode? ⇒ Boolean
Methods inherited from Flexo::Event
Constructor Details
#initialize(*args) ⇒ ModeEvent
Returns a new instance of ModeEvent.
6 7 8 9 10 |
# File 'lib/flexo/events/mode.rb', line 6 def initialize(*args) super @channelmode = Flexo::Constants::CHANPREFIX.include?(@data.params[0][0]) @modes = @data.params[1..-1].join(' ') end |
Instance Attribute Details
#modes ⇒ Object (readonly)
Returns the value of attribute modes.
4 5 6 |
# File 'lib/flexo/events/mode.rb', line 4 def modes @modes end |
Instance Method Details
#channelmode? ⇒ Boolean Also known as: chanmode?
16 17 18 |
# File 'lib/flexo/events/mode.rb', line 16 def channelmode? @channelmode end |
#usermode? ⇒ Boolean
12 13 14 |
# File 'lib/flexo/events/mode.rb', line 12 def usermode? !@channelmode end |