Class: LSP::PuppetFactResponse
Overview
export interface GetPuppetFactResponse { data: string; error: string; }
Instance Attribute Summary collapse
-
#error ⇒ Object
type: string # type: string.
-
#facts ⇒ Object
type: string # type: string.
Instance Method Summary collapse
- #from_h!(value) ⇒ Object
-
#initialize(initial_hash = nil) ⇒ PuppetFactResponse
constructor
A new instance of PuppetFactResponse.
Methods inherited from LSPBase
Constructor Details
#initialize(initial_hash = nil) ⇒ PuppetFactResponse
Returns a new instance of PuppetFactResponse.
47 48 49 50 |
# File 'lib/lsp/lsp_custom.rb', line 47 def initialize(initial_hash = nil) super @optional_method_names = %i[error] end |
Instance Attribute Details
#error ⇒ Object
type: string # type: string
45 46 47 |
# File 'lib/lsp/lsp_custom.rb', line 45 def error @error end |
#facts ⇒ Object
type: string # type: string
45 46 47 |
# File 'lib/lsp/lsp_custom.rb', line 45 def facts @facts end |
Instance Method Details
#from_h!(value) ⇒ Object
52 53 54 55 56 57 |
# File 'lib/lsp/lsp_custom.rb', line 52 def from_h!(value) value = {} if value.nil? self.facts = value['facts'] self.error = value['error'] self end |