Class: Wakame::Service::TriggerSet

Inherits:
Object
  • Object
show all
Defined in:
lib/wakame/service.rb

Instance Method Summary collapse

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

Raises:

  • (ArguemntError)


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