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

Returns:
  • (String) -

Parameters:
  • text (String) --
def escape text
  CGI.escapeHTML(text)
end

def htmlify text

Returns:
  • (String) -

Parameters:
  • text (String) --
def htmlify text
  YARD::Templates::Helpers::Markup::RDocMarkup.new(text).to_html
end

def initialize locals, render_method

Parameters:
  • 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

Returns:
  • (String) -

Parameters:
  • code (String) --
def ruby_to_html code
  code
end