Class: NvimConf::Writers::Code::CommandsWriter
- Inherits:
-
Object
- Object
- NvimConf::Writers::Code::CommandsWriter
- Defined in:
- lib/nvim_conf/writers/code/commands.rb
Constant Summary collapse
- COMMANDS_GENERATOR_MAPPING =
{ lua: Generators::Commands::Code::Lua }
Instance Method Summary collapse
-
#initialize(manager, io, format: :lua, commented: false) ⇒ CommandsWriter
constructor
A new instance of CommandsWriter.
- #write ⇒ Object
Constructor Details
#initialize(manager, io, format: :lua, commented: false) ⇒ CommandsWriter
Returns a new instance of CommandsWriter.
11 12 13 14 15 |
# File 'lib/nvim_conf/writers/code/commands.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/commands.rb', line 17 def write @manager.commands.each do |command| @io.write( [ generator_class.new(command).generate, "\n" ].join ) end end |