Module: Loofah::HtmlFragmentBehavior
- Defined in:
- lib/loofah/concerns.rb
Overview
:nodoc:
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
- #serialize_root ⇒ Object
- #to_s ⇒ Object (also: #serialize)
Class Method Details
.included(base) ⇒ Object
192 193 194 |
# File 'lib/loofah/concerns.rb', line 192 def included(base) base.extend(ClassMethods) end |
Instance Method Details
#serialize_root ⇒ Object
203 204 205 |
# File 'lib/loofah/concerns.rb', line 203 def serialize_root at_xpath("./body") || self end |
#to_s ⇒ Object Also known as: serialize
197 198 199 |
# File 'lib/loofah/concerns.rb', line 197 def to_s serialize_root.children.to_s end |