Class: Lograge::Formatters::Lines

Inherits:
Object
  • Object
show all
Defined in:
lib/lograge/formatters/lines.rb

Instance Method Summary collapse

Instance Method Details

#call(data) ⇒ Object



4
5
6
7
8
# File 'lib/lograge/formatters/lines.rb', line 4

def call(data)
  load_dependencies

  ::Lines.dump(data)
end

#load_dependenciesObject



10
11
12
13
14
15
# File 'lib/lograge/formatters/lines.rb', line 10

def load_dependencies
  require 'lines'
rescue LoadError
  puts 'You need to install the lines gem to use this output.'
  raise
end