Class: NationalRail::StationList::HpricotParser
- Inherits:
-
Mechanize::Page
- Object
- Mechanize::Page
- NationalRail::StationList::HpricotParser
- Defined in:
- lib/national-rail/station_list.rb
Instance Attribute Summary collapse
-
#doc ⇒ Object
readonly
Returns the value of attribute doc.
Instance Method Summary collapse
-
#initialize(uri = nil, response = nil, body = nil, code = nil) ⇒ HpricotParser
constructor
A new instance of HpricotParser.
Constructor Details
#initialize(uri = nil, response = nil, body = nil, code = nil) ⇒ HpricotParser
Returns a new instance of HpricotParser.
11 12 13 14 |
# File 'lib/national-rail/station_list.rb', line 11 def initialize(uri = nil, response = nil, body = nil, code = nil) @doc = Hpricot(TidyFFI::Tidy.new(body).clean) super(uri, response, body, code) end |
Instance Attribute Details
#doc ⇒ Object (readonly)
Returns the value of attribute doc.
10 11 12 |
# File 'lib/national-rail/station_list.rb', line 10 def doc @doc end |