class CtaTrack::RouteFactory
Attributes
result[R]
Public Class Methods
new(**args)
click to toggle source
# File lib/routes.rb, line 4 def initialize(**args) raise ArgumentError, "must enter api key" if API.apikey.nil? @result = {} API.routes.root.xpath("route").each do |node| @result[node.xpath('rt').text] = Route.new({:number=> node.xpath('rt').text, :name=> node.xpath('rtnm').text}) end end