Module: Loofah::HtmlFragmentBehavior

Included in:
Loofah::HTML4::DocumentFragment, Loofah::HTML5::DocumentFragment
Defined in:
lib/loofah/concerns.rb

Overview

:nodoc:

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

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_rootObject



203
204
205
# File 'lib/loofah/concerns.rb', line 203

def serialize_root
  at_xpath("./body") || self
end

#to_sObject Also known as: serialize



197
198
199
# File 'lib/loofah/concerns.rb', line 197

def to_s
  serialize_root.children.to_s
end