Class: PuppetLanguageServer::Sidecar::Protocol::PuppetNodeGraph
- Inherits:
-
BaseClass
- Object
- BaseClass
- PuppetLanguageServer::Sidecar::Protocol::PuppetNodeGraph
- Defined in:
- lib/puppet-languageserver/sidecar_protocol.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#edges ⇒ Object
Returns the value of attribute edges.
-
#error_content ⇒ Object
Returns the value of attribute error_content.
-
#vertices ⇒ Object
Returns the value of attribute vertices.
Instance Method Summary collapse
Methods inherited from BaseClass
Instance Attribute Details
#edges ⇒ Object
Returns the value of attribute edges.
141 142 143 |
# File 'lib/puppet-languageserver/sidecar_protocol.rb', line 141 def edges @edges end |
#error_content ⇒ Object
Returns the value of attribute error_content.
141 142 143 |
# File 'lib/puppet-languageserver/sidecar_protocol.rb', line 141 def error_content @error_content end |
#vertices ⇒ Object
Returns the value of attribute vertices.
141 142 143 |
# File 'lib/puppet-languageserver/sidecar_protocol.rb', line 141 def vertices @vertices end |
Instance Method Details
#from_json!(json_string) ⇒ Object
151 152 153 154 155 156 157 |
# File 'lib/puppet-languageserver/sidecar_protocol.rb', line 151 def from_json!(json_string) obj = ::JSON.parse(json_string) self.vertices = obj['vertices'] self.edges = obj['edges'] self.error_content = obj['error_content'] self end |
#to_json(*options) ⇒ Object
143 144 145 146 147 148 149 |
# File 'lib/puppet-languageserver/sidecar_protocol.rb', line 143 def to_json(*) { 'vertices' => vertices, 'edges' => edges, 'error_content' => error_content }.to_json() end |