Class: TeamApi::Config
- Inherits:
-
Object
- Object
- TeamApi::Config
- Defined in:
- lib/team_api/config.rb
Class Method Summary collapse
Class Method Details
.endpoint_config ⇒ Object
5 6 7 8 9 10 |
# 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 ⇒ Object
12 13 14 15 16 |
# 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 |