Class: Balotelli::Core::Kick
- Inherits:
-
Object
- Object
- Balotelli::Core::Kick
- Defined in:
- lib/balotelli/core/kick.rb
Instance Attribute Summary collapse
-
#channel ⇒ Object
readonly
Returns the value of attribute channel.
-
#reason ⇒ Object
readonly
Returns the value of attribute reason.
-
#who ⇒ Object
readonly
Returns the value of attribute who.
Instance Method Summary collapse
- #execute! ⇒ Object (also: #execute)
-
#initialize(data, klass) ⇒ Kick
constructor
A new instance of Kick.
Constructor Details
#initialize(data, klass) ⇒ Kick
Returns a new instance of Kick.
5 6 7 8 9 10 |
# File 'lib/balotelli/core/kick.rb', line 5 def initialize(data, klass) @who = data[:who] @channel = data[:channel] @reason = data[:reason].tr(' ', ' ') # space to nbsp @klass = klass end |
Instance Attribute Details
#channel ⇒ Object (readonly)
Returns the value of attribute channel.
4 5 6 |
# File 'lib/balotelli/core/kick.rb', line 4 def channel @channel end |
#reason ⇒ Object (readonly)
Returns the value of attribute reason.
4 5 6 |
# File 'lib/balotelli/core/kick.rb', line 4 def reason @reason end |
#who ⇒ Object (readonly)
Returns the value of attribute who.
4 5 6 |
# File 'lib/balotelli/core/kick.rb', line 4 def who @who end |
Instance Method Details
#execute! ⇒ Object Also known as: execute
12 13 14 |
# File 'lib/balotelli/core/kick.rb', line 12 def execute! @klass.sputs("KICK #{channel} #{who} #{reason}") end |