Sha256: f1e5dccf72cd7f3f8a8bc5c574603dd35c4a8e554bf44ae7c66b128c8b8062e8

Contents?: true

Size: 551 Bytes

Versions: 21

Compression:

Stored size: 551 Bytes

Contents

%i[create update delete].each do |action|
  event "observer_#{action}".to_sym, :integrate, on: action do
    execute_card_events on: action
  end
end

event :cache_delete_card_events, :store, on: :delete do
  @card_event_cache = event_cards :on_delete
end

def execute_card_events args
  setting = "on_#{args[:on]}".to_sym
  event_cards(setting).each do |event_card|
    event_card.deliver(context: self)
  end
end

def event_cards setting
  @card_event_cache ||
    ((event_rule = rule_card(setting)) && event_rule.extended_item_cards) ||
    []
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
card-1.94.1 mod/notifications/set/all/observer.rb
card-1.94.0 mod/notifications/set/all/observer.rb
card-1.93.13 mod/notifications/set/all/observer.rb
card-1.93.12 mod/notifications/set/all/observer.rb
card-1.93.11 mod/notifications/set/all/observer.rb
card-1.93.10 mod/notifications/set/all/observer.rb
card-1.93.9 mod/notifications/set/all/observer.rb
card-1.93.8 mod/notifications/set/all/observer.rb
card-1.93.7 mod/notifications/set/all/observer.rb
card-1.93.6 mod/notifications/set/all/observer.rb
card-1.93.5 mod/notifications/set/all/observer.rb
card-1.93.4 mod/notifications/set/all/observer.rb
card-1.93.3 mod/notifications/set/all/observer.rb
card-1.93.2 mod/notifications/set/all/observer.rb
card-1.93.1 mod/notifications/set/all/observer.rb
card-1.93.0 mod/notifications/set/all/observer.rb
card-1.92.2 mod/notifications/set/all/observer.rb
card-1.92.1 mod/notifications/set/all/observer.rb
card-1.92 mod/notifications/set/all/observer.rb
card-1.91 mod/notifications/set/all/observer.rb