Class: Jade::LSP::State
- Inherits:
-
Data
- Object
- Data
- Jade::LSP::State
- Defined in:
- lib/jade/lsp/state.rb
Instance Attribute Summary collapse
-
#buffers ⇒ Object
readonly
Returns the value of attribute buffers.
-
#registry ⇒ Object
readonly
Returns the value of attribute registry.
-
#source_root ⇒ Object
readonly
Returns the value of attribute source_root.
Class Method Summary collapse
Instance Method Summary collapse
- #close(uri) ⇒ Object
- #put_buffer(uri, text) ⇒ Object
- #set_registry(reg) ⇒ Object
- #with_root(root) ⇒ Object
Instance Attribute Details
#buffers ⇒ Object (readonly)
Returns the value of attribute buffers
3 4 5 |
# File 'lib/jade/lsp/state.rb', line 3 def buffers @buffers end |
#registry ⇒ Object (readonly)
Returns the value of attribute registry
3 4 5 |
# File 'lib/jade/lsp/state.rb', line 3 def registry @registry end |
#source_root ⇒ Object (readonly)
Returns the value of attribute source_root
3 4 5 |
# File 'lib/jade/lsp/state.rb', line 3 def source_root @source_root end |
Class Method Details
.empty ⇒ Object
4 5 6 |
# File 'lib/jade/lsp/state.rb', line 4 def self.empty new(source_root: nil, buffers: {}, registry: nil) end |
Instance Method Details
#close(uri) ⇒ Object
16 17 18 |
# File 'lib/jade/lsp/state.rb', line 16 def close(uri) with(buffers: buffers.except(uri)) end |
#put_buffer(uri, text) ⇒ Object
12 13 14 |
# File 'lib/jade/lsp/state.rb', line 12 def put_buffer(uri, text) with(buffers: buffers.merge(uri => text)) end |
#set_registry(reg) ⇒ Object
20 21 22 |
# File 'lib/jade/lsp/state.rb', line 20 def set_registry(reg) with(registry: reg) end |