Module: RJSV::Core::Event

Defined in:
lib/rjsv/core/event.rb

Overview

Event module for handling fifo events. This is so far a module for just the basic event printing element.

Class Method Summary collapse

Class Method Details

Prints an event type using the puts() method that shows the time, cli application name, event and event message.



16
17
18
19
20
21
# File 'lib/rjsv/core/event.rb', line 16

def print(event, message = "")
  supplement = message.empty? ? message : " | #{message}"

  puts "#{Time.now.strftime("%l:%M:%S %p").lstrip} " +
  "[#{APP_NAME}] #{event.upcase}#{supplement}"
end