Class: RailsSpider::Parser
- Inherits:
-
Object
- Object
- RailsSpider::Parser
- Defined in:
- lib/rails_spider/parser.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#doc ⇒ Object
Returns the value of attribute doc.
Instance Method Summary collapse
-
#initialize(body) ⇒ Parser
constructor
A new instance of Parser.
- #save ⇒ Object
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
#doc ⇒ Object
Returns the value of attribute doc.
3 4 5 |
# File 'lib/rails_spider/parser.rb', line 3 def doc @doc end |
Instance Method Details
#save ⇒ Object
9 10 11 |
# File 'lib/rails_spider/parser.rb', line 9 def save raise 'Should implement in subclass' end |