Sha256: 9d72ff85b5e433f6b67b0f26513a90dedfc6cd622ce35c63cdb98019f7ca0aee

Contents?: true

Size: 388 Bytes

Versions: 39

Compression:

Stored size: 388 Bytes

Contents

class Webhooks::Outgoing::EventType < ApplicationHash
  self.data = YAML.load_file("#{Rails.root}/config/models/webhooks/outgoing/event_types.yml").map do |topic, events|
    events.map { |event| (event == "crud") ? ["created", "updated", "deleted"] : event }.flatten.map { |event| {id: "#{topic}.#{event}"} }
  end.flatten

  def label_string
    name
  end

  def name
    id
  end
end

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
bullet_train-outgoing_webhooks-1.10.0 app/models/webhooks/outgoing/event_type.rb
bullet_train-outgoing_webhooks-1.9.0 app/models/webhooks/outgoing/event_type.rb
bullet_train-outgoing_webhooks-1.8.5 app/models/webhooks/outgoing/event_type.rb
bullet_train-outgoing_webhooks-1.8.4 app/models/webhooks/outgoing/event_type.rb
bullet_train-outgoing_webhooks-1.8.3 app/models/webhooks/outgoing/event_type.rb
bullet_train-outgoing_webhooks-1.8.2 app/models/webhooks/outgoing/event_type.rb
bullet_train-outgoing_webhooks-1.8.1 app/models/webhooks/outgoing/event_type.rb
bullet_train-outgoing_webhooks-1.8.0 app/models/webhooks/outgoing/event_type.rb
bullet_train-outgoing_webhooks-1.7.23 app/models/webhooks/outgoing/event_type.rb
bullet_train-outgoing_webhooks-1.7.22 app/models/webhooks/outgoing/event_type.rb
bullet_train-outgoing_webhooks-1.7.21 app/models/webhooks/outgoing/event_type.rb
bullet_train-outgoing_webhooks-1.7.20 app/models/webhooks/outgoing/event_type.rb
bullet_train-outgoing_webhooks-1.7.19 app/models/webhooks/outgoing/event_type.rb
bullet_train-outgoing_webhooks-1.7.18 app/models/webhooks/outgoing/event_type.rb
bullet_train-outgoing_webhooks-1.7.17 app/models/webhooks/outgoing/event_type.rb
bullet_train-outgoing_webhooks-1.7.16 app/models/webhooks/outgoing/event_type.rb
bullet_train-outgoing_webhooks-1.7.15 app/models/webhooks/outgoing/event_type.rb
bullet_train-outgoing_webhooks-1.7.14 app/models/webhooks/outgoing/event_type.rb
bullet_train-outgoing_webhooks-1.7.13 app/models/webhooks/outgoing/event_type.rb
bullet_train-outgoing_webhooks-1.7.12 app/models/webhooks/outgoing/event_type.rb