module Capistrano::Template::Plugin
Public Instance Methods
render(template)
click to toggle source
# File lib/capistrano/template/plugin.rb, line 4 def render(template) content = File.read(File.join(template_path, template)) ERB.new(content).result(chain.instance_eval { binding }) end
template_bindings()
click to toggle source
# File lib/capistrano/template/plugin.rb, line 9 def template_bindings case self[:template_bindings].class.name when 'Hash' [Bindings::HashBinding.new(fetch(:template_bindings))] else [Bindings::CapistranoBinding.new(self)] end end
Private Instance Methods
chain()
click to toggle source
# File lib/capistrano/template/plugin.rb, line 20 def chain @__template_chain ||= Bindings::Chain.new(*template_bindings) end