class Dome::Helpers::HtmlDrawer

Public Class Methods

new(context, &tpl) click to toggle source
# File lib/dome/helpers/html_drawer.rb, line 3
def initialize(context, &tpl)
  @context = context
  @tpl = tpl || -> x { x }
end

Public Instance Methods

matching(proc = nil, &block) click to toggle source
# File lib/dome/helpers/html_drawer.rb, line 8
def matching(proc = nil, &block)
  -> *args, &fn { @tpl.call(fn.call(*args)) if (proc || block).call(*args) }
end