SFCBus
Ruby gem that provides bus information at Keio Univ SFC.
Installation
$ gem install sfcbus
Usage
Command Line
$ sfcbus
平日
湘南台駅 -> SFC
----------
16:33
16:39 ツインライナー
16:45 笹久保経由
16:52 ツインライナー
17:00
Ruby
require 'sfcbus'
sfcbus = SFCBus.new
= sfcbus.select(
:from => :sfc,
:to => :shonandai,
:day_type => :weekday
)
# Result
.each do |bus|
puts bus.hour
puts bus.min
puts bus.from # => :sfc, :shonandai, :tsujido
puts bus.to # => :sfc, :shonandai, :tsujido
puts bus.type # => :normal, :twinliner, :sasakubo, :night
puts bus.rotary?
end
# Timetable last updated
p sfcbus.updated_at
Test
$ rake spec
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request