Class: ID3Tag::Frames::V1::GenreFrame
- Inherits:
-
Object
- Object
- ID3Tag::Frames::V1::GenreFrame
- Defined in:
- lib/id3tag/frames/v1/genre_frame.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
Instance Method Summary collapse
- #content ⇒ Object
-
#initialize(id, content) ⇒ GenreFrame
constructor
A new instance of GenreFrame.
Constructor Details
#initialize(id, content) ⇒ GenreFrame
Returns a new instance of GenreFrame.
7 8 9 |
# File 'lib/id3tag/frames/v1/genre_frame.rb', line 7 def initialize(id, content) @id, @content = id, content end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
5 6 7 |
# File 'lib/id3tag/frames/v1/genre_frame.rb', line 5 def id @id end |
Instance Method Details
#content ⇒ Object
11 12 13 14 |
# File 'lib/id3tag/frames/v1/genre_frame.rb', line 11 def content nr = @content.unpack(NumberUtil::FORMAT_FOR_8_BIT_SIGNED_INTEGER).first nr && Util::GenreNames.find_by_id(nr) end |