Class: PuppetLanguageServer::Sidecar::Protocol::BasePuppetObject
- Inherits:
-
BaseClass
- Object
- BaseClass
- PuppetLanguageServer::Sidecar::Protocol::BasePuppetObject
- Defined in:
- lib/puppet-languageserver/sidecar_protocol.rb
Overview
key => Unique name of the object calling_source => The file that was invoked to create the object source => The file that actually created the object line => The line number in the source file where the object was created char => The character number in the source file where the object was created length => The length of characters from ‘char` in the source file where the object was created
Direct Known Subclasses
Fact, PuppetClass, PuppetDataType, PuppetFunction, PuppetType
Instance Attribute Summary collapse
-
#calling_source ⇒ Object
Returns the value of attribute calling_source.
-
#char ⇒ Object
Returns the value of attribute char.
-
#key ⇒ Object
Returns the value of attribute key.
-
#length ⇒ Object
Returns the value of attribute length.
-
#line ⇒ Object
Returns the value of attribute line.
-
#source ⇒ Object
Returns the value of attribute source.
Instance Method Summary collapse
Methods inherited from BaseClass
#==, #eql?, #from_json!, #hash, #to_json
Methods included from Base
Instance Attribute Details
#calling_source ⇒ Object
Returns the value of attribute calling_source.
88 89 90 |
# File 'lib/puppet-languageserver/sidecar_protocol.rb', line 88 def calling_source @calling_source end |
#char ⇒ Object
Returns the value of attribute char.
88 89 90 |
# File 'lib/puppet-languageserver/sidecar_protocol.rb', line 88 def char @char end |
#key ⇒ Object
Returns the value of attribute key.
88 89 90 |
# File 'lib/puppet-languageserver/sidecar_protocol.rb', line 88 def key @key end |
#length ⇒ Object
Returns the value of attribute length.
88 89 90 |
# File 'lib/puppet-languageserver/sidecar_protocol.rb', line 88 def length @length end |
#line ⇒ Object
Returns the value of attribute line.
88 89 90 |
# File 'lib/puppet-languageserver/sidecar_protocol.rb', line 88 def line @line end |
#source ⇒ Object
Returns the value of attribute source.
88 89 90 |
# File 'lib/puppet-languageserver/sidecar_protocol.rb', line 88 def source @source end |
Instance Method Details
#from_h!(value) ⇒ Object
101 102 103 104 105 106 107 108 109 |
# File 'lib/puppet-languageserver/sidecar_protocol.rb', line 101 def from_h!(value) self.key = value['key'].nil? ? nil : value['key'].intern self.calling_source = value['calling_source'] self.source = value['source'] self.line = value['line'] self.char = value['char'] self.length = value['length'] self end |
#to_h ⇒ Object
90 91 92 93 94 95 96 97 98 99 |
# File 'lib/puppet-languageserver/sidecar_protocol.rb', line 90 def to_h { 'key' => key, 'calling_source' => calling_source, 'source' => source, 'line' => line, 'char' => char, 'length' => length } end |