class Solargraph::Page::Binder
@return [Binder]
@param render_method [Proc]
@param locals[Hash]
@!method self.new(locals, render_method)
the typechecker.
@todo This method directive is necessary because OpenStruct.new confuses
def escape text
-
(String)
-
Parameters:
-
text
(String
) --
def escape text CGI.escapeHTML(text) end
def htmlify text
-
(String)
-
Parameters:
-
text
(String
) --
def htmlify text YARD::Templates::Helpers::Markup::RDocMarkup.new(text).to_html end
def initialize locals, render_method
-
render_method
(Proc
) -- -
locals
(Hash
) --
def initialize locals, render_method super(locals) define_singleton_method :render do |template, layout: false, locals: {}| render_method.call(template, layout: layout, locals: locals) end define_singleton_method :erb do |template, layout: false, locals: {}| render_method.call(template, layout: layout, locals: locals) end end
def ruby_to_html code
-
(String)
-
Parameters:
-
code
(String
) --
def ruby_to_html code code end