Class: NJTransit::GTFS::QueryInterface
- Inherits:
-
Object
- Object
- NJTransit::GTFS::QueryInterface
- Defined in:
- lib/njtransit/gtfs.rb
Instance Attribute Summary collapse
-
#db ⇒ Object
readonly
Returns the value of attribute db.
Instance Method Summary collapse
-
#initialize(db_path) ⇒ QueryInterface
constructor
A new instance of QueryInterface.
- #routes ⇒ Object
- #routes_between(from:, to:) ⇒ Object
- #schedule(route:, stop:, date:) ⇒ Object
- #stops ⇒ Object
Constructor Details
#initialize(db_path) ⇒ QueryInterface
Returns a new instance of QueryInterface.
89 90 91 92 93 |
# File 'lib/njtransit/gtfs.rb', line 89 def initialize(db_path) Database.connection(db_path) @db = Database.connection setup_models end |
Instance Attribute Details
#db ⇒ Object (readonly)
Returns the value of attribute db.
87 88 89 |
# File 'lib/njtransit/gtfs.rb', line 87 def db @db end |
Instance Method Details
#routes_between(from:, to:) ⇒ Object
103 104 105 |
# File 'lib/njtransit/gtfs.rb', line 103 def routes_between(from:, to:) Queries::RoutesBetween.new(db, from: from, to: to).call end |