class ActionText::Fragment
def wrap(fragment_or_html)
def wrap(fragment_or_html) case fragment_or_html when self fragment_or_html when Nokogiri::XML::DocumentFragment # base class for all fragments new(fragment_or_html) else from_html(fragment_or_html) end end