Sha256: 573ee0dbb5b3f75285dce3fbf93a76952606fea4d17c7457cf4c71d531048da9
Contents?: true
Size: 485 Bytes
Versions: 7
Compression:
Stored size: 485 Bytes
Contents
require 'erb' module SimpleCommander module HelpFormatter class Terminal < Base def render template(:help).result(ProgramContext.new(@runner).get_binding) #template(:help).result end def render_command(command) template(:command_help).result(Context.new(command).get_binding) end def template(name) ERB.new(File.read(File.join(File.dirname(__FILE__), 'terminal', "#{name}.erb")), nil, '-') end end end end
Version data entries
7 entries across 7 versions & 1 rubygems