Class: ID3Tag::FrameIdAdvisor
- Inherits:
-
Object
- Object
- ID3Tag::FrameIdAdvisor
- Defined in:
- lib/id3tag/frame_id_advisor.rb
Constant Summary collapse
- ANY_MAJOR_VERSION =
'x'
- COMMON_FRAME_IDS_BY_VERSION =
{ 'v1.x' => { :artist => :artist, :title => :title, :album => :album, :year => :year, :comments => :comments, :genre => :genre, :track_nr => :track_nr }, 'v2.2' => { :artist => :TP1, :title => :TT2, :album => :TAL, :year => :TYE, :comments => :COM, :genre => :TCO, :track_nr => :TRK, :unsychronized_transcription => :ULT }, 'v2.3' => { :artist => :TPE1, :title => :TIT2, :album => :TALB, :year => :TYER, :comments => :COMM, :genre => :TCON, :track_nr => :TRCK, :unsychronized_transcription => :USLT }, 'v2.4' => { :artist => :TPE1, :title => :TIT2, :album => :TALB, :year => :TDRC, :comments => :COMM, :genre => :TCON, :track_nr => :TRCK, :unsychronized_transcription => :USLT } }
Instance Method Summary collapse
- #advise(frame_name) ⇒ Object
-
#initialize(version, major_version) ⇒ FrameIdAdvisor
constructor
A new instance of FrameIdAdvisor.
- #version_of_interest ⇒ Object
Constructor Details
#initialize(version, major_version) ⇒ FrameIdAdvisor
Returns a new instance of FrameIdAdvisor.
47 48 49 |
# File 'lib/id3tag/frame_id_advisor.rb', line 47 def initialize(version, major_version) @version, @major_version = version, major_version end |
Instance Method Details
#advise(frame_name) ⇒ Object
51 52 53 |
# File 'lib/id3tag/frame_id_advisor.rb', line 51 def advise(frame_name) version_ids && version_ids[frame_name] end |
#version_of_interest ⇒ Object
55 56 57 |
# File 'lib/id3tag/frame_id_advisor.rb', line 55 def version_of_interest "v#{@version}.#{@major_version}" end |