Module: Velibe
- Defined in:
- lib/velibe/db/models.rb,
lib/velibe.rb,
lib/velibe/config.rb,
lib/velibe/version.rb,
lib/velibe/api_velib.rb,
lib/velibe/db/database.rb,
lib/velibe/db/kv_store.rb,
lib/velibe/station_status.rb
Overview
Defined Under Namespace
Modules: Config, Database, KvStore
Classes: ApiVelib, Station, StationStatus, Status
Constant Summary
collapse
- Favorites =
tmp_fav.nil? ? [10035, 19003, 19004, 10031] : tmp_fav
- VERSION =
'0.2.3'
Class Method Summary
collapse
Class Method Details
.add_favorite(stations) ⇒ Object
.print_favorites ⇒ Object
37
38
39
40
41
42
43
44
|
# File 'lib/velibe.rb', line 37
def self.print_favorites
if Favorites.empty?
puts 'No favorites so far, you can add some with `velibe favorite add <your> <number>`.'
else
puts "Favorites Stations: #{Favorites.join(', ')}"
end
end
|
.print_stations(stations) ⇒ Object
22
23
24
25
26
|
# File 'lib/velibe.rb', line 22
def self.print_stations(stations)
stations = Favorites if stations.empty? or !stations
puts "Velibe >> Stations #{stations.join(', ')}:"
stations.each { |station| puts " > #{ApiVelib.get_station(station)}" }
end
|
.print_stations_bis(stations) ⇒ Object
.reset_favorites(force = false) ⇒ Object
FIXME: text display from there
.setup_station_database(force = false) ⇒ Object