class Applocale::ConvertFile

Attributes

filepath[RW]

Public Class Methods

new(convert_file, dir) click to toggle source
# File lib/applocale/Util/convert_util.rb, line 13
def initialize(convert_file, dir)
  unless convert_file.nil?
    if convert_file.to_s.strip.length > 0
      convertFilePath = File.expand_path(convert_file, dir)
      if File.exist?(convertFilePath)
        require convertFilePath
        @convert = Convert.new()
        @filepath = convertFilePath.to_s
        return
      else
        ErrorUtil::ConfigFileInValid.new('convert file not exist ').raise
      end
    end
  end
  @convert = Object.new()
end

Public Instance Methods

has_append_other() click to toggle source
# File lib/applocale/Util/convert_util.rb, line 71
def has_append_other
  return defined?(@convert.append_other) == 'method'
end
has_convent_to_locale() click to toggle source
# File lib/applocale/Util/convert_util.rb, line 31
def has_convent_to_locale
  return defined?(@convert.convent_to_locale) == 'method'
end
has_is_skip_by_key() click to toggle source
# File lib/applocale/Util/convert_util.rb, line 51
def has_is_skip_by_key
  return defined?(@convert.is_skip_by_key) == 'method'
end
has_parse_from_excel_or_csv() click to toggle source
# File lib/applocale/Util/convert_util.rb, line 61
def has_parse_from_excel_or_csv
  return defined?(@convert.parse_from_excel_or_csv) == 'method'
end
has_parse_from_locale() click to toggle source
# File lib/applocale/Util/convert_util.rb, line 41
def has_parse_from_locale
  return defined?(@convert.parse_from_locale) == 'method'
end
load_append_other(lang, target) click to toggle source
# File lib/applocale/Util/convert_util.rb, line 76
def load_append_other(lang, target)
  return @convert.append_other(lang, target)
end
load_convent_to_locale(lang, key, before_convert_value, after_convert_value) click to toggle source
# File lib/applocale/Util/convert_util.rb, line 36
def load_convent_to_locale(lang, key, before_convert_value, after_convert_value)
  return @convert.convent_to_locale(lang, key, before_convert_value, after_convert_value)
end
load_is_skip_by_key(sheetname, key) click to toggle source
# File lib/applocale/Util/convert_util.rb, line 56
def load_is_skip_by_key(sheetname, key)
  return @convert.is_skip_by_key(sheetname, key)
end
load_parse_from_excel_or_csv(sheetname, key, before_convert_value, after_convert_value) click to toggle source
# File lib/applocale/Util/convert_util.rb, line 66
def load_parse_from_excel_or_csv(sheetname, key, before_convert_value, after_convert_value)
  return @convert.parse_from_excel_or_csv(sheetname, key, before_convert_value, after_convert_value)
end
load_parse_from_locale(lang, key, before_convert_value, after_convert_value) click to toggle source
# File lib/applocale/Util/convert_util.rb, line 46
def load_parse_from_locale(lang, key, before_convert_value, after_convert_value)
  return @convert.parse_from_locale(lang, key, before_convert_value, after_convert_value)
end