Transformer for the :genres item attribute.
Parameters:
a parsed row (the intermediate hash).
current item’s position in the Head column.
Returns:
9 10 11 12
# File 'lib/reading/parsing/attributes/genres.rb', line 9 def transform_from_parsed(parsed_row, head_index) (parsed_row[:genres] || parsed_row[:head][head_index][:genres]) &.map { _1.is_a?(Hash) ? _1[:genre] : _1 } end