Class: LSP::PuppetFactResponse

Inherits:
LSPBase
  • Object
show all
Defined in:
lib/lsp/lsp_custom.rb

Overview

export interface GetPuppetFactResponse

data: string;
error: string;

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from LSPBase

#to_h, #to_json

Constructor Details

#initialize(initial_hash = nil) ⇒ PuppetFactResponse

Returns a new instance of PuppetFactResponse.



39
40
41
42
# File 'lib/lsp/lsp_custom.rb', line 39

def initialize(initial_hash = nil)
  super
  @optional_method_names = %i[error]
end

Instance Attribute Details

#errorObject

type: string # type: string



37
38
39
# File 'lib/lsp/lsp_custom.rb', line 37

def error
  @error
end

#factsObject

type: string # type: string



37
38
39
# File 'lib/lsp/lsp_custom.rb', line 37

def facts
  @facts
end

Instance Method Details

#from_h!(value) ⇒ Object



44
45
46
47
48
49
# File 'lib/lsp/lsp_custom.rb', line 44

def from_h!(value)
  value = {} if value.nil?
  self.facts = value['facts']
  self.error = value['error']
  self
end