Class: Brainguy::Event
- Inherits:
-
Struct
- Object
- Struct
- Brainguy::Event
- Defined in:
- lib/brainguy/event.rb
Overview
An event. Bundles up a symbolic name
, an originating object (source
).
and a list of event-defined args
.
Instance Attribute Summary collapse
-
#args ⇒ Object
Returns the value of attribute args.
-
#name ⇒ Object
Returns the value of attribute name.
-
#source ⇒ Object
Returns the value of attribute source.
Instance Method Summary collapse
-
#initialize ⇒ Event
constructor
A new instance of Event.
Constructor Details
#initialize ⇒ Event
Returns a new instance of Event.
8 9 10 11 |
# File 'lib/brainguy/event.rb', line 8 def initialize(*) super self.args ||= [] end |
Instance Attribute Details
#args ⇒ Object
Returns the value of attribute args
4 5 6 |
# File 'lib/brainguy/event.rb', line 4 def args @args end |
#name ⇒ Object
Returns the value of attribute name
4 5 6 |
# File 'lib/brainguy/event.rb', line 4 def name @name end |
#source ⇒ Object
Returns the value of attribute source
4 5 6 |
# File 'lib/brainguy/event.rb', line 4 def source @source end |