Class: LanguageServer::Protocol::Interface::CreateFile
- Inherits:
-
Object
- Object
- LanguageServer::Protocol::Interface::CreateFile
- Defined in:
- lib/language_server/protocol/interface/create_file.rb
Overview
Create file operation
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Instance Method Summary collapse
-
#initialize(kind:, uri:, options: nil) ⇒ CreateFile
constructor
A new instance of CreateFile.
-
#kind ⇒ "create"
A create.
-
#options ⇒ CreateFileOptions
Additional options.
- #to_hash ⇒ Object
- #to_json(*args) ⇒ Object
-
#uri ⇒ string
The resource to create.
Constructor Details
#initialize(kind:, uri:, options: nil) ⇒ CreateFile
Returns a new instance of CreateFile.
8 9 10 11 12 13 14 15 16 |
# File 'lib/language_server/protocol/interface/create_file.rb', line 8 def initialize(kind:, uri:, options: nil) @attributes = {} @attributes[:kind] = kind @attributes[:uri] = uri @attributes[:options] = if @attributes.freeze end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
42 43 44 |
# File 'lib/language_server/protocol/interface/create_file.rb', line 42 def attributes @attributes end |
Instance Method Details
#kind ⇒ "create"
A create
22 23 24 |
# File 'lib/language_server/protocol/interface/create_file.rb', line 22 def kind attributes.fetch(:kind) end |
#options ⇒ CreateFileOptions
Additional options
38 39 40 |
# File 'lib/language_server/protocol/interface/create_file.rb', line 38 def attributes.fetch(:options) end |
#to_hash ⇒ Object
44 45 46 |
# File 'lib/language_server/protocol/interface/create_file.rb', line 44 def to_hash attributes end |
#to_json(*args) ⇒ Object
48 49 50 |
# File 'lib/language_server/protocol/interface/create_file.rb', line 48 def to_json(*args) to_hash.to_json(*args) end |
#uri ⇒ string
The resource to create.
30 31 32 |
# File 'lib/language_server/protocol/interface/create_file.rb', line 30 def uri attributes.fetch(:uri) end |