class Inkcite::Renderer::MobileToggleOn

Public Instance Methods

render(tag, opt, ctx) click to toggle source
# File lib/inkcite/renderer/mobile_toggle.rb, line 8
def render tag, opt, ctx

  return '{/a}' if tag == '/mobile-toggle-on'

  id = opt[:id]
  if id.blank?
    ctx.error('The mobile-toggle-on requires an id')

  else
    "{a href=\"##{id}\" mobile=\"show\"}"

  end

end