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.



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

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



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

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

#merge_conflict(branch) ⇒ Object



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

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