Class: IrcMachine::State
- Inherits:
-
Object
- Object
- IrcMachine::State
- Defined in:
- lib/irc_machine/state.rb
Instance Attribute Summary collapse
-
#channels ⇒ Object
Returns the value of attribute channels.
-
#nick ⇒ Object
Returns the value of attribute nick.
Instance Method Summary collapse
- #channel?(channel) ⇒ Boolean
-
#initialize ⇒ State
constructor
A new instance of State.
- #reset ⇒ Object
Constructor Details
#initialize ⇒ State
Returns a new instance of State.
7 8 9 |
# File 'lib/irc_machine/state.rb', line 7 def initialize reset end |
Instance Attribute Details
#channels ⇒ Object
Returns the value of attribute channels.
5 6 7 |
# File 'lib/irc_machine/state.rb', line 5 def channels @channels end |
#nick ⇒ Object
Returns the value of attribute nick.
4 5 6 |
# File 'lib/irc_machine/state.rb', line 4 def nick @nick end |
Instance Method Details
#channel?(channel) ⇒ Boolean
16 17 18 |
# File 'lib/irc_machine/state.rb', line 16 def channel?(channel) channels.include? channel end |
#reset ⇒ Object
11 12 13 14 |
# File 'lib/irc_machine/state.rb', line 11 def reset @nick = nil @channels = [] end |