# -*- encoding : utf-8 -*- module MusicBrainz module Bindings module ReleaseGroup def parse(xml) xml = xml.xpath('./release-group') unless xml.xpath('./release-group').empty? { id: (xml.attribute('id').value rescue nil), type: (xml.attribute('type').value rescue nil), title: (xml.xpath('./title').text rescue nil), desc: (xml.xpath('./disambiguation').text rescue nil), first_release_date: (xml.xpath('./first-release-date').text rescue nil) }.merge(Relations.parse(xml)) end extend self end end end