Module: Moodle::Api
- Defined in:
- lib/moodle/api.rb,
lib/moodle/api/client.rb,
lib/moodle/api/errors.rb,
lib/moodle/api/request.rb,
lib/moodle/api/version.rb,
lib/moodle/api/configuration.rb,
lib/moodle/api/token_generator.rb
Overview
Defined Under Namespace
Classes: Client, Configuration, MoodleError, Request, TokenGenerator
Constant Summary
collapse
- VERSION =
'1.5'
Class Method Summary
collapse
Class Method Details
.client ⇒ Object
26
27
28
|
# File 'lib/moodle/api.rb', line 26
def client
@client ||= Moodle::Api::Client.new
end
|
.method_missing(method, *args, &block) ⇒ Object
13
14
15
16
17
18
19
20
|
# File 'lib/moodle/api.rb', line 13
def method_missing(method, *args, &block)
if client.respond_to?(method)
client.send(method, *args, &block)
else
client.make_request(method, args.first)
end
end
|
.respond_to?(method, include_all = false) ⇒ Boolean
22
23
24
|
# File 'lib/moodle/api.rb', line 22
def respond_to?(method, include_all = false)
client.respond_to?(method, include_all) || super
end
|