class SchoolLoop::Client

Public Class Methods

new(options={}, &block) click to toggle source

Creates new API

Calls superclass method
# File lib/school_loop/client.rb, line 24
def initialize(options={}, &block)
  super()
  setup options

  self.instance_eval(&block) if block_given?
end

Public Instance Methods

setup(options={}) click to toggle source
# File lib/school_loop/client.rb, line 31
def setup(options={})
  options = SchoolLoop.options.merge(options)
  Configuration::VALID_OPTIONS_KEYS.each do |key|
    send("#{key}=", options[key])
  end
end