Class: Event

Inherits:
Object
  • Object
show all
Defined in:
lib/zmb/event.rb,
bin/zmb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message) ⇒ Event

Returns a new instance of Event.



4
5
6
# File 'lib/zmb/event.rb', line 4

def initialize(sender)
  @sender = sender
end

Instance Attribute Details

#delegateObject

Returns the value of attribute delegate.



17
18
19
# File 'bin/zmb', line 17

def delegate
  @delegate
end

#messageObject

Returns the value of attribute message.



2
3
4
# File 'lib/zmb/event.rb', line 2

def message
  @message
end

#senderObject

Returns the value of attribute sender.



2
3
4
# File 'lib/zmb/event.rb', line 2

def sender
  @sender
end

#userObject

Returns the value of attribute user.



17
18
19
# File 'bin/zmb', line 17

def user
  @user
end

Instance Method Details

#message?Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/zmb/event.rb', line 8

def message?
  message != nil
end

#nameObject



25
# File 'bin/zmb', line 25

def name; "admin"; end

#private?Boolean

Returns:

  • (Boolean)


24
# File 'bin/zmb', line 24

def private?; true; end

#reply(msg) ⇒ Object



12
13
14
# File 'lib/zmb/event.rb', line 12

def reply(message)
  @sender.reply(self, message)
end