Class: PuppetLanguageServer::Sidecar::Protocol::PuppetDataTypeAttribute

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?, #from_json!, #hash, #to_json

Methods included from Base

#from_json!, #to_json

Instance Attribute Details

#default_valueObject

Returns the value of attribute default_value.



229
230
231
# File 'lib/puppet-languageserver/sidecar_protocol.rb', line 229

def default_value
  @default_value
end

#docObject

Returns the value of attribute doc.



229
230
231
# File 'lib/puppet-languageserver/sidecar_protocol.rb', line 229

def doc
  @doc
end

#keyObject

Returns the value of attribute key.



229
230
231
# File 'lib/puppet-languageserver/sidecar_protocol.rb', line 229

def key
  @key
end

#typesObject

Returns the value of attribute types.



229
230
231
# File 'lib/puppet-languageserver/sidecar_protocol.rb', line 229

def types
  @types
end

Instance Method Details

#from_h!(value) ⇒ Object



240
241
242
243
244
245
246
# File 'lib/puppet-languageserver/sidecar_protocol.rb', line 240

def from_h!(value)
  self.key           = value['key']
  self.default_value = value['default_value']
  self.doc           = value['doc']
  self.types         = value['types']
  self
end

#to_hObject



231
232
233
234
235
236
237
238
# File 'lib/puppet-languageserver/sidecar_protocol.rb', line 231

def to_h
  {
    'key' => key,
    'default_value' => default_value,
    'doc' => doc,
    'types' => types
  }
end