Class: LSP::PuppetResourceResponse

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

Overview

export interface GetPuppetResourceResponse

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) ⇒ PuppetResourceResponse

Returns a new instance of PuppetResourceResponse.



59
60
61
62
# File 'lib/lsp/lsp_custom.rb', line 59

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

Instance Attribute Details

#dataObject

type: string # type: string



57
58
59
# File 'lib/lsp/lsp_custom.rb', line 57

def data
  @data
end

#errorObject

type: string # type: string



57
58
59
# File 'lib/lsp/lsp_custom.rb', line 57

def error
  @error
end

Instance Method Details

#from_h!(value) ⇒ Object



64
65
66
67
68
69
# File 'lib/lsp/lsp_custom.rb', line 64

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