Class: ZshCompletionScript

Inherits:
Object
  • Object
show all
Defined in:
lib/renuo/cli/helpers/zsh_completion_script.rb

Constant Summary collapse

TEMPLATE_PATH =
File.expand_path("../templates/zsh_completion.erb", __dir__)

Instance Method Summary collapse

Constructor Details

#initialize(commands) ⇒ ZshCompletionScript

Returns a new instance of ZshCompletionScript.



8
9
10
# File 'lib/renuo/cli/helpers/zsh_completion_script.rb', line 8

def initialize(commands)
  @commands = commands
end

Instance Method Details

#renderObject



12
13
14
# File 'lib/renuo/cli/helpers/zsh_completion_script.rb', line 12

def render
  ERB.new(File.read(TEMPLATE_PATH), trim_mode: "-").result(binding)
end