class FrbParticipants::Data

Public Class Methods

load(file_name) click to toggle source
# File lib/frb-participants/data.rb, line 9
def self.load(file_name)
  path = File.join(File.dirname(File.expand_path(__FILE__)), "../../data/#{file_name}")
  YAML.load_file(path)
end
preload!() click to toggle source

Data files are large, so preloading during an initializer can save time.

# File lib/frb-participants/data.rb, line 4
def self.preload!
  [FrbParticipants::InstitutionName, FrbParticipants::FedachParticipant, FrbParticipants::FedwireParticipant].map(&:data)
  true
end