Sha256: 717dc0b02cb719963d5c19ad42b0e9402ff47e61da16b4df68f883488f49bdbe
Contents?: true
Size: 795 Bytes
Versions: 2
Compression:
Stored size: 795 Bytes
Contents
# -*- encoding: utf-8 -*- module MusicBrainz module Parsers class ReleaseGroup < Base class << self def model(xml) { :id => safe_get_attr(xml, nil, "id") || safe_get_attr(xml, "release-group", "id"), :type => safe_get_attr(xml, nil, "type") || safe_get_attr(xml, "release-group", "type"), :title => safe_get_value(xml, "title"), :disambiguation => safe_get_value(xml, "disambiguation"), :first_release_date => safe_get_value(xml, "first-release-date") } end def releases(xml) releases = [] xml.css("release").each do |r| releases << MusicBrainz::Parsers::Release.model(r) end releases end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
musicbrainz-0.7.1 | lib/parsers/release_group.rb |
musicbrainz-0.7.0 | lib/parsers/release_group.rb |