module Moodle::Api
Handles instantiating the client and determining how method calls should be delegated to the client
Used to determine the current version of the gem Semantic versioning is used guides.rubygems.org/patterns/#semantic-versioning
Constants
- VERSION
Public Class Methods
client()
click to toggle source
# File lib/moodle/api.rb, line 26 def client @client ||= Moodle::Api::Client.new end
method_missing(method, *args, &block)
click to toggle source
# File lib/moodle/api.rb, line 13 def method_missing(method, *args, &block) if client.respond_to?(method) client.send(method, *args, &block) else # assume method name is moodle external service client.make_request(method, args.first) end end
respond_to?(method, include_all = false)
click to toggle source
Calls superclass method
# File lib/moodle/api.rb, line 22 def respond_to?(method, include_all = false) client.respond_to?(method, include_all) || super end