Class: ID3Tag::Frames::V2::GenreFrame::GenreParserPre24

Inherits:
GenreParser
  • Object
show all
Defined in:
lib/id3tag/frames/v2/genre_frame/genre_parser_pre_24.rb

Constant Summary collapse

REFINEMENT_IN_PARENTHESES =
/(\(\([^()]+\))/
GENRE_NUMBERS_OR_NAMES =
/\(([^)]+)\)/
REFINEMENTS =
/([)](?<blank>)[(][^(])|(\)(?<regular>[^()]+)[)]*)|(\((?<in_parentheses>\([^()]+\)))/

Constants inherited from GenreParser

ID3Tag::Frames::V2::GenreFrame::GenreParser::NUMERIC

Instance Attribute Summary

Attributes inherited from GenreParser

#genre_string

Instance Method Summary collapse

Methods inherited from GenreParser

#expand_abbreviation, #initialize

Constructor Details

This class inherits a constructor from ID3Tag::Frames::V2::GenreFrame::GenreParser

Instance Method Details

#genresObject



10
11
12
13
14
15
16
17
18
19
20
# File 'lib/id3tag/frames/v2/genre_frame/genre_parser_pre_24.rb', line 10

def genres
  result = []
  just_genres.each_with_index do |genre, index|
    if ID3Tag::StringUtil.blank?(just_requirements[index])
      result << expand_abbreviation(genre)
    else
      result << just_requirements[index]
    end
  end
  result
end