Class: Crabfarm::Adapters::Parser::Nokogiri

Inherits:
Object
  • Object
show all
Defined in:
lib/crabfarm/adapters/parser/nokogiri.rb

Class Method Summary collapse

Class Method Details

.formatObject



5
6
7
# File 'lib/crabfarm/adapters/parser/nokogiri.rb', line 5

def self.format
  'html'
end

.parse(_raw) ⇒ Object



9
10
11
# File 'lib/crabfarm/adapters/parser/nokogiri.rb', line 9

def self.parse(_raw)
  ::Nokogiri::HTML _raw
end

.preprocess_parsing_target(_target) ⇒ Object



13
14
15
16
17
18
19
# File 'lib/crabfarm/adapters/parser/nokogiri.rb', line 13

def self.preprocess_parsing_target(_target)
  if _target.respond_to? :to_html
    _target.to_html
  else
    _target
  end
end