class LanguageServer::Protocol::Interface::RenameFileOptions
Rename file options
Attributes
attributes[R]
Public Class Methods
new(overwrite: nil, ignore_if_exists: nil)
click to toggle source
# File lib/language_server/protocol/interface/rename_file_options.rb, line 8 def initialize(overwrite: nil, ignore_if_exists: nil) @attributes = {} @attributes[:overwrite] = overwrite if overwrite @attributes[:ignoreIfExists] = ignore_if_exists if ignore_if_exists @attributes.freeze end
Public Instance Methods
ignore_if_exists()
click to toggle source
Ignores if target exists.
@return [boolean]
# File lib/language_server/protocol/interface/rename_file_options.rb, line 29 def ignore_if_exists attributes.fetch(:ignoreIfExists) end
overwrite()
click to toggle source
Overwrite target if existing. Overwrite wins over `ignoreIfExists`
@return [boolean]
# File lib/language_server/protocol/interface/rename_file_options.rb, line 21 def overwrite attributes.fetch(:overwrite) end
to_hash()
click to toggle source
# File lib/language_server/protocol/interface/rename_file_options.rb, line 35 def to_hash attributes end
to_json(*args)
click to toggle source
# File lib/language_server/protocol/interface/rename_file_options.rb, line 39 def to_json(*args) to_hash.to_json(*args) end