Class: NationalRail::StationList::HpricotParser

Inherits:
Mechanize::Page
  • Object
show all
Defined in:
lib/national-rail/station_list.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#docObject (readonly)

Returns the value of attribute doc


10
11
12
# File 'lib/national-rail/station_list.rb', line 10

def doc
  @doc
end