Class: SprayVent::Event
- Inherits:
-
Object
- Object
- SprayVent::Event
- Defined in:
- lib/spray_vent/event.rb
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#target ⇒ Object
readonly
Returns the value of attribute target.
Instance Method Summary collapse
- #cancel ⇒ Object
- #cancel? ⇒ Boolean
-
#initialize(name, target, args = nil) ⇒ Event
constructor
A new instance of Event.
Constructor Details
#initialize(name, target, args = nil) ⇒ Event
Returns a new instance of Event.
12 13 14 15 16 17 |
# File 'lib/spray_vent/event.rb', line 12 def initialize(name, target, args = nil) @name = name @target = target args ||= [] @args = args end |
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args.
9 10 11 |
# File 'lib/spray_vent/event.rb', line 9 def args @args end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
9 10 11 |
# File 'lib/spray_vent/event.rb', line 9 def name @name end |
#target ⇒ Object (readonly)
Returns the value of attribute target.
9 10 11 |
# File 'lib/spray_vent/event.rb', line 9 def target @target end |
Instance Method Details
#cancel ⇒ Object
19 20 21 |
# File 'lib/spray_vent/event.rb', line 19 def cancel @cancel = true end |
#cancel? ⇒ Boolean
23 24 25 |
# File 'lib/spray_vent/event.rb', line 23 def cancel? @cancel end |