Class: Yoda::Server::Providers::Base Abstract
- Inherits:
-
Object
- Object
- Yoda::Server::Providers::Base
- Defined in:
- lib/yoda/server/providers/base.rb
Overview
This class is abstract.
Direct Known Subclasses
Completion, Definition, Hover, Signature, TextDocumentDidChange, TextDocumentDidOpen, TextDocumentDidSave, WorkspaceDidChangeWorkspaceFolders, WorkspaceDidCreateFiles, WorkspaceDidDeleteFiles, WorkspaceDidRenameFiles, WorkspaceSymbol
Instance Attribute Summary collapse
- #notifier ⇒ Notifier readonly
- #session ⇒ Session readonly
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(notifier:, session:) ⇒ Base
constructor
A new instance of Base.
- #provide(params) ⇒ Object abstract
-
#timeout ⇒ Integer?
Seconds to timeout the task.
Constructor Details
#initialize(notifier:, session:) ⇒ Base
Returns a new instance of Base.
27 28 29 30 |
# File 'lib/yoda/server/providers/base.rb', line 27 def initialize(notifier:, session:) @notifier = notifier @session = session end |
Instance Attribute Details
#notifier ⇒ Notifier (readonly)
20 21 22 |
# File 'lib/yoda/server/providers/base.rb', line 20 def notifier @notifier end |
#session ⇒ Session (readonly)
23 24 25 |
# File 'lib/yoda/server/providers/base.rb', line 23 def session @session end |
Class Method Details
.provide?(method) ⇒ Boolean
14 15 16 |
# File 'lib/yoda/server/providers/base.rb', line 14 def provide?(method) provider_method == method end |
.provider_method ⇒ Symbol
This method is abstract.
9 10 11 |
# File 'lib/yoda/server/providers/base.rb', line 9 def provider_method fail NotImplementedError end |
Instance Method Details
#provide(params) ⇒ Object
This method is abstract.
34 35 36 |
# File 'lib/yoda/server/providers/base.rb', line 34 def provide(params) fail NotImplementedError end |
#timeout ⇒ Integer?
Returns Seconds to timeout the task. if nil, the task does not timeout.
39 40 41 |
# File 'lib/yoda/server/providers/base.rb', line 39 def timeout nil end |