Class: UWaterlooAPI
- Inherits:
-
Object
- Object
- UWaterlooAPI
- Includes:
- Routes
- Defined in:
- lib/uwaterlooapi.rb,
lib/uwaterlooapi/query.rb,
lib/uwaterlooapi/routes.rb,
lib/uwaterlooapi/version.rb
Defined Under Namespace
Modules: Routes Classes: Query
Constant Summary collapse
- VERSION =
'0.0.4'
Instance Method Summary collapse
-
#initialize(api_key) ⇒ UWaterlooAPI
constructor
A new instance of UWaterlooAPI.
Methods included from Routes
Constructor Details
#initialize(api_key) ⇒ UWaterlooAPI
Returns a new instance of UWaterlooAPI.
9 10 11 12 13 14 15 |
# File 'lib/uwaterlooapi.rb', line 9 def initialize(api_key) get_base_routes.each do |route| self.class.send :define_method, route do UWaterlooAPI::Query.new "/#{route}", "/#{route}", api_key end end end |