Class: Flipper::Echo::Stdout::Notifier

Inherits:
Object
  • Object
show all
Defined in:
lib/flipper/echo/stdout/notifier.rb

Overview

Simple stdout notifier intended as a basis for more advanced custom notifiers

Instance Method Summary collapse

Instance Method Details

#notify(event) ⇒ nil

Send notification message to stdout

Returns:

  • (nil)


14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/flipper/echo/stdout/notifier.rb', line 14

def notify(event)
  parts = []
  parts << '[Flipper]'
  parts << "Feature \"#{event.feature.name}\""
  parts << event.action

  target = target_message(event)

  parts << "for #{target}" if target

  $stdout.puts(parts.join(' '))
end