Class: Wakame::Service::TriggerSet
- Inherits:
-
Object
- Object
- Wakame::Service::TriggerSet
- Defined in:
- lib/wakame/service.rb
Instance Method Summary collapse
- #add_trigger(trigger) ⇒ Object (also: #register_trigger)
-
#initialize(service_cluster_id) ⇒ TriggerSet
constructor
A new instance of TriggerSet.
Constructor Details
#initialize(service_cluster_id) ⇒ TriggerSet
Returns a new instance of TriggerSet.
266 267 268 269 |
# File 'lib/wakame/service.rb', line 266 def initialize(service_cluster_id) @service_cluster_id = service_cluster_id @triggers = [] end |
Instance Method Details
#add_trigger(trigger) ⇒ Object Also known as: register_trigger
271 272 273 274 275 276 |
# File 'lib/wakame/service.rb', line 271 def add_trigger(trigger) raise ArguemntError unless trigger.is_a?(Trigger) @triggers << trigger Wakame.log.debug(trigger.inspect) trigger.register_hooks(@service_cluster_id) end |