Class: LanguageServer::Protocol::Interface::PrepareRenameResult
- Inherits:
-
Object
- Object
- LanguageServer::Protocol::Interface::PrepareRenameResult
- Defined in:
- lib/language_server/protocol/interface/prepare_rename_result.rb,
sig/language_server/protocol/interface/prepare_rename_result.rbs
Instance Attribute Summary collapse
-
#attributes ⇒ Hash[Symbol, untyped]
readonly
Returns the value of attribute attributes.
Instance Method Summary collapse
- #default_behavior ⇒ boolean
-
#end ⇒ Position
The range's end position.
-
#initialize(start: nil, end: nil, range: nil, placeholder: nil, default_behavior: nil) ⇒ PrepareRenameResult
constructor
A new instance of PrepareRenameResult.
- #placeholder ⇒ string
- #range ⇒ Range
-
#start ⇒ Position
The range's start position.
- #to_hash ⇒ Hash[Symbol, untyped]
- #to_json(*args) ⇒ String
Constructor Details
#initialize(start: nil, end: nil, range: nil, placeholder: nil, default_behavior: nil) ⇒ PrepareRenameResult
Returns a new instance of PrepareRenameResult.
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/language_server/protocol/interface/prepare_rename_result.rb', line 5 def initialize(start: nil, end: nil, range: nil, placeholder: nil, default_behavior: nil) @attributes = {} @attributes[:start] = start if start @attributes[:end] = binding.local_variable_get(:end) if binding.local_variable_get(:end) @attributes[:range] = range if range @attributes[:placeholder] = placeholder if placeholder @attributes[:defaultBehavior] = default_behavior if default_behavior @attributes.freeze end |
Instance Attribute Details
#attributes ⇒ Hash[Symbol, untyped] (readonly)
Returns the value of attribute attributes.
57 58 59 |
# File 'lib/language_server/protocol/interface/prepare_rename_result.rb', line 57 def attributes @attributes end |
Instance Method Details
#default_behavior ⇒ boolean
53 54 55 |
# File 'lib/language_server/protocol/interface/prepare_rename_result.rb', line 53 def default_behavior attributes.fetch(:defaultBehavior) end |
#end ⇒ Position
The range's end position.
29 30 31 |
# File 'lib/language_server/protocol/interface/prepare_rename_result.rb', line 29 def end attributes.fetch(:end) end |
#placeholder ⇒ string
45 46 47 |
# File 'lib/language_server/protocol/interface/prepare_rename_result.rb', line 45 def placeholder attributes.fetch(:placeholder) end |
#range ⇒ Range
37 38 39 |
# File 'lib/language_server/protocol/interface/prepare_rename_result.rb', line 37 def range attributes.fetch(:range) end |
#start ⇒ Position
The range's start position.
21 22 23 |
# File 'lib/language_server/protocol/interface/prepare_rename_result.rb', line 21 def start attributes.fetch(:start) end |
#to_hash ⇒ Hash[Symbol, untyped]
59 60 61 |
# File 'lib/language_server/protocol/interface/prepare_rename_result.rb', line 59 def to_hash attributes end |
#to_json(*args) ⇒ String
63 64 65 |
# File 'lib/language_server/protocol/interface/prepare_rename_result.rb', line 63 def to_json(*args) to_hash.to_json(*args) end |