Class: WahWah::ID3::GenreFrameBody

Inherits:
TextFrameBody show all
Defined in:
lib/wahwah/id3/genre_frame_body.rb

Constant Summary

Constants inherited from FrameBody

FrameBody::ENCODING_MAPPING, FrameBody::ENCODING_TERMINATOR_SIZE

Instance Attribute Summary

Attributes inherited from FrameBody

#value

Instance Method Summary collapse

Methods inherited from FrameBody

#initialize

Constructor Details

This class inherits a constructor from WahWah::ID3::FrameBody

Instance Method Details

#parseObject



6
7
8
9
10
11
12
# File 'lib/wahwah/id3/genre_frame_body.rb', line 6

def parse
  super

  # If value is numeric value, or contain numeric value in parens
  # can use as index for ID3v1 genre list
  @value = ID3::V1::GENRES[$1.to_i] if @value =~ /^\((\d+)\)$/ || @value =~ /^(\d+)$/
end