Class: NvimControl::Fetcher

Inherits:
Object
  • Object
show all
Defined in:
lib/nvim_control/fetcher.rb

Class Method Summary collapse

Class Method Details

.fetchObject



8
9
10
11
12
13
14
15
16
17
# File 'lib/nvim_control/fetcher.rb', line 8

def fetch
  context = build_context
  JSON.generate(context)
rescue ConnectionError => e
  format_error("Connection failed", e.message)
rescue OperationError => e
  format_error("Context extraction failed", e.message)
rescue StandardError => e
  format_error("Unexpected error", e.message)
end