Class: RubyLsp::Requests::Support::HighlightTarget
- Inherits:
-
Object
- Object
- RubyLsp::Requests::Support::HighlightTarget
- Extended by:
- T::Sig
- Defined in:
- lib/ruby_lsp/requests/support/highlight_target.rb
Defined Under Namespace
Classes: HighlightMatch
Constant Summary collapse
Instance Method Summary collapse
- #highlight_type(other) ⇒ Object
-
#initialize(node) ⇒ HighlightTarget
constructor
A new instance of HighlightTarget.
Constructor Details
#initialize(node) ⇒ HighlightTarget
Returns a new instance of HighlightTarget.
30 31 32 33 |
# File 'lib/ruby_lsp/requests/support/highlight_target.rb', line 30 def initialize(node) @node = node @value = T.let(value(node), T.nilable(String)) end |
Instance Method Details
#highlight_type(other) ⇒ Object
36 37 38 |
# File 'lib/ruby_lsp/requests/support/highlight_target.rb', line 36 def highlight_type(other) matched_highlight(other) if @value && @value == value(other) end |