Module: OmniauthOpenidFederation::Tasks::PathResolver
- Defined in:
- lib/omniauth_openid_federation/tasks/path_resolver.rb
Class Method Summary collapse
Class Method Details
.resolve(file_path) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/omniauth_openid_federation/tasks/path_resolver.rb', line 6 def self.resolve(file_path) return file_path if file_path.start_with?("/") config = Configuration.config if defined?(Rails) && Rails.root Rails.root.join(file_path).to_s elsif config.root_path File.join(config.root_path, file_path) else File.(file_path) end end |