Class: Flexo::Event

Inherits:
Object
  • Object
show all
Defined in:
lib/flexo/event.rb

Overview

Base class for all events generated by Flexo. Nothing of interest happening here, actually. Most of the fun stuff is taken care of by the subclasses

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(manager, data) ⇒ Event

Create the event, setting some variables



15
16
17
18
19
# File 'lib/flexo/event.rb', line 15

def initialize(manager, data)
  @manager = manager
  @data    = data
  @manager.logger.debug2("Creating instance of #{self.class}")
end

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



6
7
8
# File 'lib/flexo/event.rb', line 6

def data
  @data
end

#nicknameObject (readonly) Also known as: nick, from, by, who

Returns the value of attribute nickname.



7
8
9
# File 'lib/flexo/event.rb', line 7

def nickname
  @nickname
end

Instance Method Details

#me?Boolean Also known as: is_me?, from_me?, by_me?

Checks the nickname in the hostmask to see if you’re the one that made this event trigger, or if it was someone else.

Returns:

  • (Boolean)


24
25
# File 'lib/flexo/event.rb', line 24

def me?
end