Class: NationalRail::JourneyPlanner::NokogiriParser

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(uri = nil, response = nil, body = nil, code = nil) ⇒ NokogiriParser

Returns a new instance of NokogiriParser.



71
72
73
74
# File 'lib/national-rail/journey_planner.rb', line 71

def initialize(uri = nil, response = nil, body = nil, code = nil)
  @doc = Nokogiri(TidyFFI::Tidy.new(body).clean)
  super(uri, response, body, code)
end

Instance Attribute Details

#docObject (readonly)

Returns the value of attribute doc.



70
71
72
# File 'lib/national-rail/journey_planner.rb', line 70

def doc
  @doc
end