Module: ActsAsContentHighlightable

Defined in:
lib/acts_as_content_highlightable.rb,
lib/acts_as_content_highlightable/model.rb,
lib/acts_as_content_highlightable/engine.rb,
lib/acts_as_content_highlightable/version.rb,
lib/generators/acts_as_content_highlightable/install_generator.rb,
app/controller/acts_as_content_highlightable/content_highlights_controller.rb

Defined Under Namespace

Modules: Generators, Model Classes: ContentHighlightsController, Engine, HtmlNodeParser

Constant Summary collapse

VERSION =
"0.2.1"

Class Method Summary collapse

Class Method Details

.extract_text_from_html(text) ⇒ Object



16
17
18
19
# File 'lib/acts_as_content_highlightable.rb', line 16

def self.extract_text_from_html(text)
  return nil unless text.is_a? String
  return ActsAsContentHighlightable::HtmlNodeParser.new(text).body_text
end