class Solargraph::Page::Binder
Public Class Methods
new(locals, render_method)
click to toggle source
@param locals [Hash] @param render_method [Proc]
Calls superclass method
# File lib/solargraph/page.rb, line 12 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
Public Instance Methods
escape(text)
click to toggle source
@param text [String] @return [String]
# File lib/solargraph/page.rb, line 30 def escape text CGI.escapeHTML(text) end
htmlify(text)
click to toggle source
@param text [String] @return [String]
# File lib/solargraph/page.rb, line 24 def htmlify text YARD::Templates::Helpers::Markup::RDocMarkup.new(text).to_html end
ruby_to_html(code)
click to toggle source
@param code [String] @return [String]
# File lib/solargraph/page.rb, line 36 def ruby_to_html code code end