Class: AdLocalize::Parsers::CSVParser
- Inherits:
-
Object
- Object
- AdLocalize::Parsers::CSVParser
- Defined in:
- lib/ad_localize/parsers/csv_parser.rb
Constant Summary collapse
- COMMENT_KEY_COLUMN_IDENTIFIER =
'comment'.freeze
- CSV_WORDING_KEYS_COLUMN =
'key'.freeze
Instance Method Summary collapse
- #call(csv_path:, export_request:) ⇒ Object
-
#initialize(key_parser: nil) ⇒ CSVParser
constructor
A new instance of CSVParser.
Constructor Details
Instance Method Details
#call(csv_path:, export_request:) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/ad_localize/parsers/csv_parser.rb', line 12 def call(csv_path:, export_request:) locales = find_locales(csv_path: csv_path, export_request: export_request) LOGGER.debug("#{csv_path} - locales : #{locales.to_sentence}") return if locales.blank? keys = find_keys(csv_path: csv_path) wording = build_wording( csv_path: csv_path, locales: locales, keys: keys, export_request: export_request ) wording end |