Module: MusicBrainz::Bindings::ReleaseGroup
- Extended by:
- ReleaseGroup
- Included in:
- ReleaseGroup
- Defined in:
- lib/musicbrainz/bindings/release_group.rb
Instance Method Summary collapse
Instance Method Details
#parse(xml) ⇒ Object
4 5 6 7 8 9 10 11 12 13 |
# File 'lib/musicbrainz/bindings/release_group.rb', line 4 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 |