Class: Neovim::Write
Class Method Summary collapse
Instance Method Summary collapse
- #flush ⇒ Object
-
#initialize(client) ⇒ Write
constructor
A new instance of Write.
- #print(*args) ⇒ Object
- #puts(*args) ⇒ Object
Constructor Details
#initialize(client) ⇒ Write
Returns a new instance of Write.
63 64 65 |
# File 'lib/neovim/ruby_provider.rb', line 63 def initialize client @client = client end |
Class Method Details
.open(client) ⇒ Object
56 57 58 59 60 61 |
# File 'lib/neovim/ruby_provider.rb', line 56 def open client i = new client yield i ensure i.finish end |
Instance Method Details
#flush ⇒ Object
78 79 |
# File 'lib/neovim/ruby_provider.rb', line 78 def flush end |
#print(*args) ⇒ Object
66 67 68 69 |
# File 'lib/neovim/ruby_provider.rb', line 66 def print *args args.each { |a| write a.to_s } nil end |
#puts(*args) ⇒ Object
70 71 72 73 74 75 76 77 |
# File 'lib/neovim/ruby_provider.rb', line 70 def puts *args args.each { |a| a = a.to_s write a write "\n" unless a.end_with? $/ } nil end |