Sha256: 27237d2c5d05c8729258c0113074569f90bce88bdfcd35197a5ee8579f98ab50
Contents?: true
Size: 1.25 KB
Versions: 4
Compression:
Stored size: 1.25 KB
Contents
module LanguageServer module Protocol module Interface # # Create file operation # class CreateFile def initialize(kind:, uri:, options: nil, annotation_id: nil) @attributes = {} @attributes[:kind] = kind @attributes[:uri] = uri @attributes[:options] = options if options @attributes[:annotationId] = annotation_id if annotation_id @attributes.freeze end # # A create # # @return ["create"] def kind attributes.fetch(:kind) end # # The resource to create. # # @return [string] def uri attributes.fetch(:uri) end # # Additional options # # @return [CreateFileOptions] def options attributes.fetch(:options) end # # An optional annotation identifer describing the operation. # # @return [string] def annotation_id attributes.fetch(:annotationId) end attr_reader :attributes def to_hash attributes end def to_json(*args) to_hash.to_json(*args) end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems