Class: Nabokov::Nabokovfile

Inherits:
Object
  • Object
show all
Defined in:
lib/nabokov/core/nabokovfile.rb

Overview

Class represents the nabokovfile with the settings for nabokov

Instance Attribute Summary collapse

Instance Method Summary collapse

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_pathString

Returns The localizations repo local path.

Returns:

  • (String)

    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_branchString

Returns The localizations repo master branch.

Returns:

  • (String)

    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_urlString

Returns The localizations repo url string.

Returns:

  • (String)

    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_pathString

Returns The project repo local path.

Returns:

  • (String)

    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_pathsHash

Returns The Hash with key as localization name and value as repspected localization file path.

Returns:

  • (Hash)

    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