Class: SprayVent::Event

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#argsObject (readonly)

Returns the value of attribute args.



9
10
11
# File 'lib/spray_vent/event.rb', line 9

def args
  @args
end

#nameObject (readonly)

Returns the value of attribute name.



9
10
11
# File 'lib/spray_vent/event.rb', line 9

def name
  @name
end

#targetObject (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

#cancelObject



19
20
21
# File 'lib/spray_vent/event.rb', line 19

def cancel
  @cancel = true
end

#cancel?Boolean

Returns:

  • (Boolean)


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

def cancel?
  @cancel
end