Module: BulletTrain::OutgoingWebhooks

Defined in:
lib/bullet_train/outgoing_webhooks.rb,
lib/bullet_train/outgoing_webhooks/engine.rb,
lib/bullet_train/outgoing_webhooks/version.rb

Defined Under Namespace

Classes: Engine

Constant Summary collapse

VERSION =
"1.11.0"

Class Method Summary collapse

Class Method Details

.current_parent_methodObject



27
28
29
# File 'lib/bullet_train/outgoing_webhooks.rb', line 27

def self.current_parent_method
  "current_#{parent_association}"
end

.default_for(klass, method, default_value) ⇒ Object



6
7
8
# File 'lib/bullet_train/outgoing_webhooks.rb', line 6

def self.default_for(klass, method, default_value)
  klass.respond_to?(method) ? klass.send(method) || default_value : default_value
end

.parent_associationObject



15
16
17
# File 'lib/bullet_train/outgoing_webhooks.rb', line 15

def self.parent_association
  parent_class.underscore.to_sym
end

.parent_association_idObject



31
32
33
# File 'lib/bullet_train/outgoing_webhooks.rb', line 31

def self.parent_association_id
  :"#{parent_association}_id"
end

.parent_class_specified?Boolean

Returns:

  • (Boolean)


23
24
25
# File 'lib/bullet_train/outgoing_webhooks.rb', line 23

def self.parent_class_specified?
  parent_class != "Team"
end

.parent_resourceObject



19
20
21
# File 'lib/bullet_train/outgoing_webhooks.rb', line 19

def self.parent_resource
  parent_class.underscore.pluralize.to_sym
end