class method self.wrap

Ruby on Rails 8.1.2

Since v6.0.6

Available in: v6.0.6 v6.1.7.10 v7.0.10 v7.1.6 v7.2.3 v8.0.4 v8.1.2

Signature

self.wrap(fragment_or_html)

No documentation comment.

Parameters

fragment_or_html req
Source
# File actiontext/lib/action_text/fragment.rb, line 8
      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

Defined in actiontext/lib/action_text/fragment.rb line 8 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActionText::Fragment

Type at least 2 characters to search.

↑↓ navigate · open · esc close