Class: Standard::Lsp::Logger

Inherits:
Object
  • Object
show all
Defined in:
lib/standard/lsp/logger.rb

Instance Method Summary collapse

Constructor Details

#initializeLogger

Returns a new instance of Logger.



4
5
6
# File 'lib/standard/lsp/logger.rb', line 4

def initialize
  @puts_onces = []
end

Instance Method Details

#puts(message) ⇒ Object



8
9
10
# File 'lib/standard/lsp/logger.rb', line 8

def puts(message)
  warn("[server] #{message}")
end

#puts_once(message) ⇒ Object



12
13
14
15
16
# File 'lib/standard/lsp/logger.rb', line 12

def puts_once(message)
  return if @puts_onces.include?(message)
  @puts_onces << message
  puts(message)
end