Class: FindStrKey::FindValue

Inherits:
Object
  • Object
show all
Defined in:
lib/applocale/Core/FindStrKey/find_str_key.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(platform, proj_path, report_folder, key) ⇒ FindValue

Returns a new instance of FindValue.



20
21
22
23
24
25
# File 'lib/applocale/Core/FindStrKey/find_str_key.rb', line 20

def initialize(platform, proj_path, report_folder, key)
  self.platform = platform
  self.proj_path = proj_path
  self.report_folder = report_folder
  self.key = key
end

Instance Attribute Details

#keyObject

Returns the value of attribute key.



19
20
21
# File 'lib/applocale/Core/FindStrKey/find_str_key.rb', line 19

def key
  @key
end

#platformObject

Returns the value of attribute platform.



19
20
21
# File 'lib/applocale/Core/FindStrKey/find_str_key.rb', line 19

def platform
  @platform
end

#proj_pathObject

Returns the value of attribute proj_path.



19
20
21
# File 'lib/applocale/Core/FindStrKey/find_str_key.rb', line 19

def proj_path
  @proj_path
end

#report_folderObject

Returns the value of attribute report_folder.



19
20
21
# File 'lib/applocale/Core/FindStrKey/find_str_key.rb', line 19

def report_folder
  @report_folder
end

Instance Method Details

#findObject



28
29
30
31
32
33
34
35
36
# File 'lib/applocale/Core/FindStrKey/find_str_key.rb', line 28

def find()
  if platform == Applocale::Platform::IOS
    findobj = FindStrKey::FindValueIOS.new(self.proj_path, self.key)
    purekey_result_ordered, result_ordered = findobj.find
    gen = FindStrKey::GenReport.new(self.proj_path, self.report_folder,purekey_result_ordered, result_ordered)
    gen.gen_xlsx
    gen.gen_txt
  end
end