Class: Nabokov::Nabokovfile
- Inherits:
-
Object
- Object
- Nabokov::Nabokovfile
- Defined in:
- lib/nabokov/core/nabokovfile.rb
Overview
Class represents the nabokovfile with the settings for nabokov
Instance Attribute Summary collapse
-
#localizations_repo_local_path ⇒ String
The localizations repo local path.
-
#localizations_repo_master_branch ⇒ String
The localizations repo master branch.
-
#localizations_repo_url ⇒ String
The localizations repo url string.
-
#project_local_path ⇒ String
The project repo local path.
-
#project_localization_file_paths ⇒ Hash
The Hash with key as localization name and value as repspected localization file path.
Instance Method Summary collapse
-
#initialize(path) ⇒ Nabokovfile
constructor
A new instance of Nabokovfile.
Constructor Details
#initialize(path) ⇒ Nabokovfile
Returns a new instance of Nabokovfile.
20 21 22 23 24 25 26 27 |
# File 'lib/nabokov/core/nabokovfile.rb', line 20 def initialize(path) raise "Path is a required parameter" if path.nil? raise "Couldn't find nabokov file at '#{path}'" unless File.exist?(path) nabokovfile = File.read(path) yaml_data = read_data_from_yaml_file(nabokovfile, path) validate_content(yaml_data) read_content(yaml_data) end |
Instance Attribute Details
#localizations_repo_local_path ⇒ String
Returns The localizations repo local path.
14 15 16 |
# File 'lib/nabokov/core/nabokovfile.rb', line 14 def localizations_repo_local_path @localizations_repo_local_path end |
#localizations_repo_master_branch ⇒ String
Returns The localizations repo master branch.
12 13 14 |
# File 'lib/nabokov/core/nabokovfile.rb', line 12 def localizations_repo_master_branch @localizations_repo_master_branch end |
#localizations_repo_url ⇒ String
Returns The localizations repo url string.
10 11 12 |
# File 'lib/nabokov/core/nabokovfile.rb', line 10 def localizations_repo_url @localizations_repo_url end |
#project_local_path ⇒ String
Returns The project repo local path.
18 19 20 |
# File 'lib/nabokov/core/nabokovfile.rb', line 18 def project_local_path @project_local_path end |
#project_localization_file_paths ⇒ Hash
Returns The Hash with key as localization name and value as repspected localization file path.
16 17 18 |
# File 'lib/nabokov/core/nabokovfile.rb', line 16 def project_localization_file_paths @project_localization_file_paths end |