Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
TODO
Ruby
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
bin
config
fixtures
lib
public
spec
.document
.gitignore
.rspec
.watchr
Gemfile
LICENSE
README.md
Rakefile
config.ru
mensa.gemspec

README.md

mensa

Fetches the daily bill of fare from the pages of the Studentenwerk Darmstadt.

Usage

To get all canteens you simly have to call Mensa.canteens:

Mensa.canteens # => Array

To access a specific canteen you can use the Mensa[:<name>] method:

Mensa[:stadtmitte]        # => Canteen
Mensa[:lichtwiese]        # => Canteen
Mensa[:haardtring]        # => Canteen
Mensa[:schoefferstrasse]  # => Canteen
Mensa[:dieburg]           # => Canteen

A canteen has basically three methods:

Mensa[:stadtmitte].name   # => "Mensa Stadtmitte"
Mensa[:stadtmitte].date   # => Time
Mensa[:stadtmitte].fares  # => Array

A fare has a name, a price and a type:

fare = Mensa[:stadtmitte].fares.first
fare.name   # => "Hähnchen-Nuggets-im Knuspermantel dazu ein Kräuterdip"
fare.price  # => 190 (price in euro cent)
fare.type   # => :poultry

Copyright

Copyright (c) 2009 Konstantin Tennhard. See LICENSE for details.

Something went wrong with that request. Please try again.