class method
self.wrap
Ruby on Rails 7.1.6
Since v6.0.6Signature
self.wrap(fragment_or_html)
No documentation comment.
Parameters
-
fragment_or_htmlreq
Source
# 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
Defined in actiontext/lib/action_text/fragment.rb line 6
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionText::Fragment