Class: BigFiles::ConfigFileParser
- Inherits:
-
Object
- Object
- BigFiles::ConfigFileParser
- Defined in:
- lib/bigfiles/config_file_parser.rb
Overview
Load configuration from files
Instance Attribute Summary collapse
-
#project_config_filename ⇒ Object
readonly
Returns the value of attribute project_config_filename.
Instance Method Summary collapse
-
#initialize(project_config_filename = '.bigfiles.yml', yaml_class: YAML, file_class: File) ⇒ ConfigFileParser
constructor
A new instance of ConfigFileParser.
- #parse_config_files ⇒ Object
Constructor Details
#initialize(project_config_filename = '.bigfiles.yml', yaml_class: YAML, file_class: File) ⇒ ConfigFileParser
Returns a new instance of ConfigFileParser.
10 11 12 13 14 15 16 |
# File 'lib/bigfiles/config_file_parser.rb', line 10 def initialize(project_config_filename = '.bigfiles.yml', yaml_class: YAML, file_class: File) @project_config_filename = project_config_filename @yaml_class = yaml_class @file_class = file_class end |
Instance Attribute Details
#project_config_filename ⇒ Object (readonly)
Returns the value of attribute project_config_filename.
8 9 10 |
# File 'lib/bigfiles/config_file_parser.rb', line 8 def project_config_filename @project_config_filename end |
Instance Method Details
#parse_config_files ⇒ Object
18 19 20 21 22 |
# File 'lib/bigfiles/config_file_parser.rb', line 18 def parse_config_files config = {} project_config = parse_project_config config.merge(project_config) end |