Method: ID3Tag::Tag#get_frame

Defined in:
lib/id3tag/tag.rb

#get_frame(frame_id) ⇒ Object



50
51
52
53
54
55
56
57
# File 'lib/id3tag/tag.rb', line 50

def get_frame(frame_id)
  frames = get_frames(frame_id)
  if frames.count > 1
    raise MultipleFrameError, "Could not return only one frame with id: #{frame_id}. Tag has #{frames.count} of them. Try #get_frames to get all of them"
  else
    frames.first
  end
end