Class: PuppetLanguageServer::Sidecar::Protocol::Resource

Inherits:
BaseClass
  • Object
show all
Defined in:
lib/puppet-languageserver/sidecar_protocol.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from BaseClass

#==, #eql?, #hash

Instance Attribute Details

#manifestObject

Returns the value of attribute manifest.



387
388
389
# File 'lib/puppet-languageserver/sidecar_protocol.rb', line 387

def manifest
  @manifest
end

Instance Method Details

#from_h!(value) ⇒ Object



395
396
397
398
# File 'lib/puppet-languageserver/sidecar_protocol.rb', line 395

def from_h!(value)
  self.manifest = value['manifest']
  self
end

#from_json!(json_string) ⇒ Object



404
405
406
# File 'lib/puppet-languageserver/sidecar_protocol.rb', line 404

def from_json!(json_string)
  from_h!(::JSON.parse(json_string))
end

#to_hObject



389
390
391
392
393
# File 'lib/puppet-languageserver/sidecar_protocol.rb', line 389

def to_h
  {
    'manifest' => manifest
  }
end

#to_json(*options) ⇒ Object



400
401
402
# File 'lib/puppet-languageserver/sidecar_protocol.rb', line 400

def to_json(*options)
  to_h.to_json(options)
end