module Moodle
Public Class Methods
config()
click to toggle source
Obtain the global configuration
# File lib/moodle.rb, line 36 def self.config @@config end
configure(options={})
click to toggle source
Configure at global level trough hash
# File lib/moodle.rb, line 25 def self.configure(options={}) options.each {|k,v| @@config[k.to_sym] = v if @valid_config_keys.include? k.to_sym} end
configure_with(path_to_yaml_file)
click to toggle source
Configure at global level through yaml file
# File lib/moodle.rb, line 30 def self.configure_with(path_to_yaml_file) config = YAML::load(IO.read(path_to_yaml_file)) configure(config) end
new(options={})
click to toggle source
Configuration is for the instance only
# File lib/moodle.rb, line 20 def self.new(options={}) Moodle::Client.new(options) end