Class: PuppetLanguageServer::Sidecar::Protocol::Resource
- Defined in:
- lib/puppet-languageserver/sidecar_protocol.rb
Instance Attribute Summary collapse
-
#manifest ⇒ Object
Returns the value of attribute manifest.
Instance Method Summary collapse
- #from_h!(value) ⇒ Object
- #from_json!(json_string) ⇒ Object
- #to_h ⇒ Object
- #to_json(*options) ⇒ Object
Methods inherited from BaseClass
Instance Attribute Details
#manifest ⇒ Object
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_h ⇒ Object
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(*) to_h.to_json() end |