Class: Balotelli::Core::Kick

Inherits:
Object
  • Object
show all
Defined in:
lib/balotelli/core/kick.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#channelObject (readonly)

Returns the value of attribute channel.



4
5
6
# File 'lib/balotelli/core/kick.rb', line 4

def channel
  @channel
end

#reasonObject (readonly)

Returns the value of attribute reason.



4
5
6
# File 'lib/balotelli/core/kick.rb', line 4

def reason
  @reason
end

#whoObject (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