class Applyrics::Project
Public Class Methods
detected_platform()
click to toggle source
# File lib/applyrics/project.rb, line 18 def detected_platform if is_ios? :ios elsif is_android? :android elsif is_unity? :unity else nil end end
is_android?()
click to toggle source
# File lib/applyrics/project.rb, line 10 def is_android? Dir["*.gradle"].count > 0 end
is_ios?()
click to toggle source
# File lib/applyrics/project.rb, line 6 def is_ios? (Dir["*.xcodeproj"] + Dir["*.xcworkspace"]).count > 0 end
is_unity?()
click to toggle source
# File lib/applyrics/project.rb, line 14 def is_unity? false end
new(platform=nil, path="")
click to toggle source
# File lib/applyrics/project.rb, line 31 def initialize(platform=nil, path="") if platform.nil? platform = self.class.detected_platform end @platform = platform if @platform == :ios @project = Applyrics::Project_iOS.new(path) end end
Public Instance Methods
apply_languages(data)
click to toggle source
# File lib/applyrics/project.rb, line 75 def apply_languages(data) @project.apply_languages(data) end
default_language()
click to toggle source
@return [String] The language which are the default language in the project
# File lib/applyrics/project.rb, line 55 def default_language @project.default_language end
detected_languages()
click to toggle source
@return [Array] An array of languages detected in the project.
# File lib/applyrics/project.rb, line 46 def detected_languages @project.detected_languages() end
language_files()
click to toggle source
# File lib/applyrics/project.rb, line 50 def language_files @project.language_files() end
platform()
click to toggle source
# File lib/applyrics/project.rb, line 79 def platform @platform end
platform_project_settings(name)
click to toggle source
@param [String] the name of the setting to read. @return [String, nil] the value of the setting or nil if not found.
# File lib/applyrics/project.rb, line 61 def platform_project_settings(name) @project.platform_project_settings(name) end
rebuild_files()
click to toggle source
Rebuild the language files.
# File lib/applyrics/project.rb, line 71 def rebuild_files @project.rebuild_files() end
string_files()
click to toggle source
@return [Object, nil] the strings files found in the project
# File lib/applyrics/project.rb, line 66 def string_files @project.string_files() end