Class: Event
- Inherits:
-
Object
- Object
- Event
- Defined in:
- lib/zmb/event.rb,
bin/zmb
Instance Attribute Summary collapse
-
#delegate ⇒ Object
Returns the value of attribute delegate.
-
#message ⇒ Object
Returns the value of attribute message.
-
#sender ⇒ Object
Returns the value of attribute sender.
-
#user ⇒ Object
Returns the value of attribute user.
Instance Method Summary collapse
-
#initialize(message) ⇒ Event
constructor
A new instance of Event.
- #message? ⇒ Boolean
- #name ⇒ Object
- #private? ⇒ Boolean
- #reply(msg) ⇒ Object
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
#delegate ⇒ Object
Returns the value of attribute delegate.
17 18 19 |
# File 'bin/zmb', line 17 def delegate @delegate end |
#message ⇒ Object
Returns the value of attribute message.
2 3 4 |
# File 'lib/zmb/event.rb', line 2 def @message end |
#sender ⇒ Object
Returns the value of attribute sender.
2 3 4 |
# File 'lib/zmb/event.rb', line 2 def sender @sender end |
#user ⇒ Object
Returns the value of attribute user.
17 18 19 |
# File 'bin/zmb', line 17 def user @user end |
Instance Method Details
#message? ⇒ Boolean
8 9 10 |
# File 'lib/zmb/event.rb', line 8 def != nil end |
#name ⇒ Object
25 |
# File 'bin/zmb', line 25 def name; "admin"; end |
#private? ⇒ 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() @sender.reply(self, ) end |