Class: TryApi::ConfigParser
- Inherits:
-
Object
- Object
- TryApi::ConfigParser
- Defined in:
- app/models/try_api/config_parser.rb
Class Method Summary collapse
Class Method Details
.read ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'app/models/try_api/config_parser.rb', line 5 def read if File.exists?("#{ Rails.root }/config/try_api.yml") hash = YAML.load_file("#{ Rails.root }/config/try_api.yml") TryApi::Project.parse hash.with_indifferent_access else raise ConfigFileNotFound end end |