<img src=“
” alt=“Gem Version” /> <img src=“api.travis-ci.org/scotdalton/institutions.png?branch=master” alt=“Build Status” /> <img src=“
” alt=“Dependency Status” /> <img src=“
” /> <img src=“
” alt=“Coverage Status” />
Institutions
This gem provides a mechanism for creating Institutions from a hash of Institutional data elements.
Institutions Basics
Getting institutions
Institutions reads in YAML files and creates a Hash of Institution instances with the Institution#code as the Hash key.
require 'institutions'
institutions = Institutions.institutions
Setting load paths
Specify additional directories to search for institutional YAMLs.
require 'institutions'
Institutions.loadpaths << File.join("path", "to", "new", "load", "directory")
Setting file name
Specify additional YAML file names that contain institutions.
require 'institutions'
Institutions.filenames << "my_institution.yml"
Institution attributes
Institutions have a number of attributes available, separated into logical modules
Core
code-
Stringof unique code for the institution (required) name-
Stringof user friendly name for the institution (required) default-
Booleanindicating if this is a default institution
Auth
auth-
Hashof attributes for an authentication/authorization system
Ip Addresses
ip_addresses-
Arrayof ip addresses for the institution
MVC
models-
Hashof attributes for models in an MVC application views-
Hashof attributes for views in an MVC application controllers-
Hashof attributes for controllers in an MVC application
Parents
parent_code-
Stringof code representing the institution’s parent
Services
services-
Hashof services for the given institution