<img src=“https://badge.fury.io/rb/institutions.png” alt=“Gem Version” /> <img src=“https://api.travis-ci.org/scotdalton/institutions.png?branch=master” alt=“Build Status” /> <img src=“https://gemnasium.com/scotdalton/institutions.png” alt=“Dependency Status” /> <img src=“https://codeclimate.com/github/scotdalton/institutions.png” /> <img src=“https://coveralls.io/repos/scotdalton/institutions/badge.png” 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