Class: NvimConf::Writers::Code::GlobalsWriter
- Inherits:
-
Object
- Object
- NvimConf::Writers::Code::GlobalsWriter
- Defined in:
- lib/nvim_conf/writers/code/globals.rb
Constant Summary collapse
- GLOBAL_GENERATOR_MAPPING =
{ lua: Generators::Globals::Code::Lua }
Instance Method Summary collapse
-
#initialize(manager, io, format: :lua, commented: false) ⇒ GlobalsWriter
constructor
A new instance of GlobalsWriter.
- #write ⇒ Object
Constructor Details
#initialize(manager, io, format: :lua, commented: false) ⇒ GlobalsWriter
Returns a new instance of GlobalsWriter.
11 12 13 14 15 |
# File 'lib/nvim_conf/writers/code/globals.rb', line 11 def initialize(manager, io, format: :lua, commented: false) @manager = manager @io = io @format = format end |
Instance Method Details
#write ⇒ Object
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/nvim_conf/writers/code/globals.rb', line 17 def write @manager.globals.each do |global| @io.write( [ generator_class.new(global).generate, "\n" ].join ) end end |