Permalink
Browse files

Update docs for version 0.7

  • Loading branch information...
1 parent 5a80421 commit 1c8567ff95dcdd40886b48e1285df5446828bee1 Brian Douglas Smith committed Mar 10, 2012
Showing with 25 additions and 25 deletions.
  1. +23 −23 README.md
  2. +2 −2 hrt_bus.gemspec
View
@@ -1,14 +1,14 @@
# hrt_bus
-Ruby gem for public HRT bus location data
+Ruby gem for real-time Hampton Roads Transit bus location data
## Installation
gem install hrt_bus
## Examples
-### HRT bus as a Ruby ActiveModel object
+### A Bus as a Ruby ActiveModel object
HrtBus::Rider.new(:route_id => "20", :direction => "inbound").bus
@@ -21,6 +21,27 @@ Ruby gem for public HRT bus location data
attr_accessor :time = Sat, 03 Mar 2012 23:24:28 +0000,
>
+### Is my bus late?
+
+ HrtBus::Rider.new(:route_id => "20", :direction => "inbound").bus.late?
+
+### Send yourself a SMS or Tweet when your bus is close!
+
+ (1..15).each do |i|
+
+ rider = HrtBus::Rider.new(:route_id => "2",
+ :direction => "inbound",
+ :lat => "36.870347",
+ :lon => "-76.301163" )
+
+ if rider.bus.present? && rider.distance_to_bus <= 3
+ # Do something really cool like send a SMS or Tweet!
+ end
+
+ sleep 30
+
+ end
+
### Generate a static Google Map for a bus
HrtBus::Rider.new(:route_id => "15", :direction => "outbound").bus.static_map
@@ -55,27 +76,6 @@ Ruby gem for public HRT bus location data
]
...
-### Determine if a bus is valid
-
- HrtBus::Bus.active_buses.select { |bus| bus.route_id => "2" }.first.valid?
-
-### Send yourself a SMS or Tweet when your bus is close!
-
- (1..15).each do |i|
-
- rider = HrtBus::Rider.new(:route_id => "2",
- :direction => "inbound",
- :lat => "36.870347",
- :lon => "-76.301163" )
-
- if rider.bus.present? && rider.distance_to_bus <= 3
- # Do something really cool like send a SMS or Tweet!
- end
-
- sleep 30
-
- end
-
## Contributing to hrt_bus
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
View
@@ -8,8 +8,8 @@ Gem::Specification.new do |s|
s.authors = ["Brian Douglas Smith"]
s.email = ["m.b1205@gmail.com"]
s.homepage = "https://github.com/bds/hrt_bus"
- s.summary = %q{Ruby gem for real-time public HRT bus location data}
- s.description = %q{Ruby gem for real-time public HRT bus location data}
+ s.summary = %q{Real-time Hampton Roads Transit bus location data}
+ s.description = %q{Bus number, route, GPS coordiantes, early/ontime/late and more}
s.rubyforge_project = "hrt_bus"

0 comments on commit 1c8567f

Please sign in to comment.