Class: Fame::XcodeProject

Inherits:
Object
  • Object
show all
Defined in:
lib/fame/xcode_project.rb

Overview

Handles the Xcode Project that is subject to localization

Constant Summary collapse

ACCEPTED_FILE_TYPES =

All accepted Xcode project file types

[".xcodeproj"].freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(xcode_proj_path) ⇒ XcodeProject

Initializer



15
16
17
18
# File 'lib/fame/xcode_project.rb', line 15

def initialize(xcode_proj_path)
  @xcode_proj_path = xcode_proj_path
  validate_xcodeproj_path!
end

Instance Attribute Details

#xcode_proj_pathObject

Returns the value of attribute xcode_proj_path.



9
10
11
# File 'lib/fame/xcode_project.rb', line 9

def xcode_proj_path
  @xcode_proj_path
end

Instance Method Details

#all_languagesArray<String>

Determines all languages that are used in the current Xcode project.



24
25
26
27
# File 'lib/fame/xcode_project.rb', line 24

def all_languages
  project_file = XCProjectFile.new(@xcode_proj_path)
  project_file.project["knownRegions"].select { |r| r != "Base" }
end