class NvimConf::Managers::Commands

Attributes

commands[R]

Public Class Methods

new() click to toggle source
# File lib/nvim_conf/managers/commands.rb, line 8
def initialize
  @commands = []
end
section_name() click to toggle source
# File lib/nvim_conf/managers/commands.rb, line 13
def section_name
  "Commands"
end

Public Instance Methods

c(name, description: "", body: "", vim_exec: false)
Alias for: command
command(name, description: "", body: "", vim_exec: false) click to toggle source
# File lib/nvim_conf/managers/commands.rb, line 18
def command(name, description: "", body: "", vim_exec: false)
  store_command(name, description, body, vim_exec)
end
Also aliased as: new, c
new(name, description: "", body: "", vim_exec: false)
Alias for: command

Private Instance Methods

store?() click to toggle source
# File lib/nvim_conf/managers/commands.rb, line 33
def store?
  @commands.any?
end
store_command(name, description, body, vim_exec) click to toggle source
# File lib/nvim_conf/managers/commands.rb, line 27
def store_command(name, description, body, vim_exec)
  @commands << Models::Command.new(
    name, description, body, vim_exec: vim_exec
  )
end