class TeamApi::Config

Public Class Methods

endpoint_config() click to toggle source
# File lib/team_api/config.rb, line 5
def self.endpoint_config
  @endpoint_config ||= begin
    endpoint_config_path = File.join File.dirname(__FILE__), 'endpoints.yml'
    SafeYAML.load_file endpoint_config_path, safe: true
  end
end
endpoint_info_by_collection() click to toggle source
# File lib/team_api/config.rb, line 12
def self.endpoint_info_by_collection
  @endpoint_info_by_collection ||= Config.endpoint_config.map do |item|
    [item['collection'], item]
  end.to_h
end