Class: PuppetEditorServices::Server::Base
- Inherits:
-
Object
- Object
- PuppetEditorServices::Server::Base
- Defined in:
- lib/puppet_editor_services/server/base.rb
Instance Attribute Summary collapse
-
#connection_options ⇒ Object
readonly
Returns the value of attribute connection_options.
-
#handler_options ⇒ Object
readonly
Returns the value of attribute handler_options.
-
#protocol_options ⇒ Object
readonly
Returns the value of attribute protocol_options.
-
#server_options ⇒ Object
readonly
Returns the value of attribute server_options.
Instance Method Summary collapse
-
#connection(connection_id) ⇒ Object
Returns a client connection for a given connection_id.
-
#initialize(server_options, connection_options, protocol_options, handler_options) ⇒ Base
constructor
A new instance of Base.
- #log(message) ⇒ Object
- #name ⇒ Object
- #start ⇒ Object
Constructor Details
#initialize(server_options, connection_options, protocol_options, handler_options) ⇒ Base
Returns a new instance of Base.
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/puppet_editor_services/server/base.rb', line 16 def initialize(, , , ) @server_options = .nil? ? {} : .dup @connection_options = .nil? ? {} : .dup @protocol_options = .nil? ? {} : .dup @handler_options = .nil? ? {} : .dup @connection_options[:class] = PuppetEditorServices::Connection::Base if @connection_options[:class].nil? @protocol_options[:class] = PuppetEditorServices::Protocol::Base if @protocol_options[:class].nil? @handler_options[:class] = PuppetEditorServices::Handler::Base if @handler_options[:class].nil? @server_options[:servicename] = 'LANGUAGE SERVER' if @server_options[:servicename].nil? # Assumes there's only ONE active simpler server running at a time. PuppetEditorServices::Server.current_server = self end |
Instance Attribute Details
#connection_options ⇒ Object (readonly)
Returns the value of attribute connection_options.
10 11 12 |
# File 'lib/puppet_editor_services/server/base.rb', line 10 def @connection_options end |
#handler_options ⇒ Object (readonly)
Returns the value of attribute handler_options.
10 11 12 |
# File 'lib/puppet_editor_services/server/base.rb', line 10 def @handler_options end |
#protocol_options ⇒ Object (readonly)
Returns the value of attribute protocol_options.
10 11 12 |
# File 'lib/puppet_editor_services/server/base.rb', line 10 def @protocol_options end |
#server_options ⇒ Object (readonly)
Returns the value of attribute server_options.
10 11 12 |
# File 'lib/puppet_editor_services/server/base.rb', line 10 def @server_options end |
Instance Method Details
#connection(connection_id) ⇒ Object
Returns a client connection for a given connection_id
33 |
# File 'lib/puppet_editor_services/server/base.rb', line 33 def connection(connection_id); end |
#log(message) ⇒ Object
37 38 39 |
# File 'lib/puppet_editor_services/server/base.rb', line 37 def log() PuppetEditorServices.(:debug, "#{name}: #{}") end |
#name ⇒ Object
12 13 14 |
# File 'lib/puppet_editor_services/server/base.rb', line 12 def name 'SRV' end |
#start ⇒ Object
35 |
# File 'lib/puppet_editor_services/server/base.rb', line 35 def start; end |