Class: LspRouter::Config
- Inherits:
-
Object
- Object
- LspRouter::Config
- Includes:
- Singleton
- Defined in:
- lib/lsp_router/config.rb
Overview
config
Defined Under Namespace
Instance Attribute Summary collapse
-
#encoding ⇒ Object
Returns the value of attribute encoding.
-
#logfile ⇒ Object
Returns the value of attribute logfile.
-
#loglevel ⇒ Object
Returns the value of attribute loglevel.
-
#servers ⇒ Object
readonly
Returns the value of attribute servers.
Instance Method Summary collapse
- #add_server(name, &block) ⇒ Object
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
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
#encoding ⇒ Object
Returns the value of attribute encoding.
9 10 11 |
# File 'lib/lsp_router/config.rb', line 9 def encoding @encoding end |
#logfile ⇒ Object
Returns the value of attribute logfile.
9 10 11 |
# File 'lib/lsp_router/config.rb', line 9 def logfile @logfile end |
#loglevel ⇒ Object
Returns the value of attribute loglevel.
9 10 11 |
# File 'lib/lsp_router/config.rb', line 9 def loglevel @loglevel end |
#servers ⇒ Object (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
17 18 19 |
# File 'lib/lsp_router/config.rb', line 17 def add_server(name, &block) @servers.push Server.new(name, &block) end |