Module: Qa::Authorities::LocalSubauthority
- Included in:
- Local
- Defined in:
- lib/qa/authorities/local_subauthority.rb
Instance Method Summary collapse
-
#names ⇒ Object
Local sub-authorities are any YAML files in the sub_authorities_path.
-
#sub_authorities_path ⇒ Object
Path to sub-authority files is either the full path to a directory or the path to a directory relative to the Rails application.
Instance Method Details
#names ⇒ Object
Local sub-authorities are any YAML files in the sub_authorities_path
14 15 16 |
# File 'lib/qa/authorities/local_subauthority.rb', line 14 def names Dir.entries().map { |f| File.basename(f, ".yml") if f.match(/yml$/) }.compact end |
#sub_authorities_path ⇒ Object
Path to sub-authority files is either the full path to a directory or the path to a directory relative to the Rails application
5 6 7 8 9 10 11 |
# File 'lib/qa/authorities/local_subauthority.rb', line 5 def if AUTHORITIES_CONFIG[:local_path].starts_with?(File::Separator) AUTHORITIES_CONFIG[:local_path] else File.join(Rails.root, AUTHORITIES_CONFIG[:local_path]) end end |