class RailFeeds::NetworkRail::HTTPClient

A wrapper class for ::Net::HTTP

Public Class Methods

new(credentials: nil, **args) click to toggle source
Calls superclass method RailFeeds::HTTPClient::new
# File lib/rail_feeds/network_rail/http_client.rb, line 7
def initialize(credentials: nil, **args)
  credentials ||= RailFeeds::NetworkRail::Credentials
  super
end

Public Instance Methods

fetch(path) click to toggle source

Fetch path from server. @param [String] path The path to fetch. @yield contents

@yieldparam [IO] file Either a Tempfile or StringIO.
Calls superclass method RailFeeds::HTTPClient#fetch
# File lib/rail_feeds/network_rail/http_client.rb, line 16
def fetch(path)
  super "https://datafeeds.networkrail.co.uk/#{path}"
end