class FormatParser::MP3Parser::TagWrapper
Wraps the Tag object returned by ID3Tag in such a way that a usable JSON representation gets returned
Constants
- MEMBERS
Public Class Methods
new(wrapped)
click to toggle source
Calls superclass method
# File lib/parsers/mp3_parser.rb, line 44 def self.new(wrapped) wrapped ? super : nil end
Public Instance Methods
to_h()
click to toggle source
# File lib/parsers/mp3_parser.rb, line 48 def to_h tag = __getobj__ MEMBERS.each_with_object({}) do |k, h| value = tag.public_send(k) h[k] = value if value && !value.empty? end end