class HighLine::TemplateRenderer
as context.
Renders an erb template taking a {Question} and a {HighLine} instance
def self.const_missing(name)
-
name
(Symbol
) -- automatically passed constant's name as Symbol
def self.const_missing(name) HighLine.const_get(name) end
def initialize(template, source, highline)
def initialize(template, source, highline) @template = template @source = source @highline = highline end
def menu
-
(Question, Menu)
- {#source} attribute.
def menu source end
def method_missing(method, *args)
-
(String)
- error message.
def method_missing(method, *args) "Method #{method} with args #{args.inspect} " \ "is not available on #{inspect}. " \ "Try #{methods(false).sort.inspect}" end
def render
-
(String)
- rendered template
def render template.result(binding) end