Class: PuppetEditorServices::Connection::Stdio

Inherits:
Base
  • Object
show all
Defined in:
lib/puppet_editor_services/connection/stdio.rb

Instance Attribute Summary

Attributes inherited from Base

#protocol, #server

Instance Method Summary collapse

Methods inherited from Base

#error?, #id, #initialize, #post_init, #receive_data, #unbind

Constructor Details

This class inherits a constructor from PuppetEditorServices::Connection::Base

Instance Method Details

#closeObject



19
20
21
22
# File 'lib/puppet_editor_services/connection/stdio.rb', line 19

def close
  server.close_connection
  true
end

#close_after_writingObject



13
14
15
16
17
# File 'lib/puppet_editor_services/connection/stdio.rb', line 13

def close_after_writing
  $editor_services_stdout.flush # rubocop:disable Style/GlobalVars  We need this global var
  server.close_connection
  true
end

#send_data(data) ⇒ Object



8
9
10
11
# File 'lib/puppet_editor_services/connection/stdio.rb', line 8

def send_data(data)
  $editor_services_stdout.write(data) # rubocop:disable Style/GlobalVars  We need this global var
  true
end