Sha256: 1f4e5038a6a82a7976944f7ec3141190ba6125532a72e5cdfa309a502e0fecca
Contents?: true
Size: 548 Bytes
Versions: 1
Compression:
Stored size: 548 Bytes
Contents
require 'wombat' Dir[File.dirname(__FILE__) + "/pennride/*.rb"].each { |file| require file } ROOT = 'http://pennrides.com' class Pennride attr_accessor :routes # Returns array of instantiated Routes def initialize(root = ROOT) @root = root @routes = Wombat.crawl { base_url ROOT path '/simple/routes' routes "xpath=//li[@class='arrow']", :iterator do name "xpath=./a/text()" href "xpath=./a/@href" end }['routes'].map { |r| Route.new(r['name'], r['href']) } end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
pennride-0.1.1 | lib/pennride.rb |