class MusicalScore::Score::Identification::Creator
Attributes
name[R]
type[R]
Public Class Methods
create_by_hash(doc)
click to toggle source
# File lib/musical_score/score/identification/creator.rb, line 22 def self.create_by_hash(doc) type = doc["type"].to_sym name = doc["content"] return MusicalScore::Score::Identification::Creator.new(name, type) end
create_by_xml(xml_doc)
click to toggle source
# File lib/musical_score/score/identification/creator.rb, line 15 def self.create_by_xml(xml_doc) type = xml_doc.attributes["type"].to_sym name = xml_doc.text return MusicalScore::Score::Identification::Creator.new(name, type) end
new(name, type)
click to toggle source
# File lib/musical_score/score/identification/creator.rb, line 9 def initialize(name, type) @name = name @type = type end
Public Instance Methods
export_xml()
click to toggle source
# File lib/musical_score/score/identification/creator.rb, line 28 def export_xml creator = REXML::Element.new('creator') creator.add_attribute('type', @type) creator.add_text(@name) return creator end