Class: FlashFlow::Notifier::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/flash_flow/notifier.rb

Instance Method Summary collapse

Constructor Details

#initialize(config = nil) ⇒ Base

Returns a new instance of Base.



7
8
9
10
11
12
13
# File 'lib/flash_flow/notifier.rb', line 7

def initialize(config=nil)
  notifier_class_name = config && config['class'] && config['class']['name']
  return unless notifier_class_name

  @notifier_class = Object.const_get(notifier_class_name)
  @notifier = @notifier_class.new(config['class'])
end

Instance Method Details

#deleted_branch(branch) ⇒ Object



19
20
21
# File 'lib/flash_flow/notifier.rb', line 19

def deleted_branch(branch)
  @notifier.deleted_branch(branch) if @notifier.respond_to?(:deleted_branch)
end

#merge_conflict(branch) ⇒ Object



15
16
17
# File 'lib/flash_flow/notifier.rb', line 15

def merge_conflict(branch)
  @notifier.merge_conflict(branch) if @notifier.respond_to?(:merge_conflict)
end