Module: Extractify

Defined in:
lib/extractify.rb,
lib/extractify/version.rb

Constant Summary collapse

VERSION =
"0.0.1"

Class Method Summary collapse

Class Method Details

.extract(doc, instructions = {}) ⇒ Object



5
6
7
8
9
10
11
12
13
# File 'lib/extractify.rb', line 5

def self.extract(doc, instructions = {})
  results = []

  doc = Nokogiri.parse(doc) unless doc.is_a?(Nokogiri::XML::Document)

  results = extract_nodes(doc, instructions)

  results
end