Class: RailsSpider::Parser

Inherits:
Object
  • Object
show all
Defined in:
lib/rails_spider/parser.rb

Direct Known Subclasses

Szlawyers

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(body) ⇒ Parser

Returns a new instance of Parser.



5
6
7
# File 'lib/rails_spider/parser.rb', line 5

def initialize(body)
  @doc = Nokogiri::HTML(body)
end

Instance Attribute Details

#docObject

Returns the value of attribute doc.



3
4
5
# File 'lib/rails_spider/parser.rb', line 3

def doc
  @doc
end

Instance Method Details

#saveObject



9
10
11
# File 'lib/rails_spider/parser.rb', line 9

def save
  raise 'Should implement in subclass'
end