Sha256: bea28ca1325dc974617d9cf5f1dc189df519efd4d5e99489baa0e23079ddf313

Contents?: true

Size: 481 Bytes

Versions: 2

Compression:

Stored size: 481 Bytes

Contents

# -*- encoding: utf-8 -*-

module MusicBrainz
  module Parsers
    class Track < Base
      class << self
        def model(xml)
          {
            :position => safe_get_value(xml, "position"),
            :recording_id => safe_get_attr(xml, "recording", "id"),
            :title => safe_get_value(xml, "recording > title"),
            :length => safe_get_value(xml, "length") || safe_get_value(xml, "recording > length")
          }
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
musicbrainz-0.7.1 lib/parsers/track.rb
musicbrainz-0.7.0 lib/parsers/track.rb