class NvimConf::Writers::Code::MappingsWriter
Constants
- MAPPING_GENERATOR_MAPPING
Public Class Methods
new(manager, io, format: :lua, commented: false)
click to toggle source
# File lib/nvim_conf/writers/code/mappings.rb, line 13 def initialize(manager, io, format: :lua, commented: false) @manager = manager @io = io @format = format end
Public Instance Methods
write()
click to toggle source
# File lib/nvim_conf/writers/code/mappings.rb, line 19 def write @manager.mappings.each do |mapping| @io.write( [ generator_class.new(mapping).generate, "\n" ].join ) end end
Private Instance Methods
generator_class()
click to toggle source
# File lib/nvim_conf/writers/code/mappings.rb, line 32 def generator_class MAPPING_GENERATOR_MAPPING[@format] end