method

wrap

rails latest stable - Class: ActionText::Fragment
wrap(fragment_or_html)
public

No documentation available.

# File actiontext/lib/action_text/fragment.rb, line 6
      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