Class: LspRouter::Config

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/lsp_router/config.rb

Overview

config

Defined Under Namespace

Modules: M Classes: Server

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



11
12
13
14
# File 'lib/lsp_router/config.rb', line 11

def initialize
  @servers = []
  @encoding = 'utf-16'
end

Instance Attribute Details

#encodingObject

Returns the value of attribute encoding.



9
10
11
# File 'lib/lsp_router/config.rb', line 9

def encoding
  @encoding
end

#logfileObject

Returns the value of attribute logfile.



9
10
11
# File 'lib/lsp_router/config.rb', line 9

def logfile
  @logfile
end

#loglevelObject

Returns the value of attribute loglevel.



9
10
11
# File 'lib/lsp_router/config.rb', line 9

def loglevel
  @loglevel
end

#serversObject (readonly)

Returns the value of attribute servers.



8
9
10
# File 'lib/lsp_router/config.rb', line 8

def servers
  @servers
end

Instance Method Details

#add_server(name, &block) ⇒ Object

Parameters:

  • name (String)


17
18
19
# File 'lib/lsp_router/config.rb', line 17

def add_server(name, &block)
  @servers.push Server.new(name, &block)
end