Method: EagleCAD::Sheet::Instance#to_xml
- Defined in:
- lib/eaglecad/sheet.rb
#to_xml ⇒ Object
73 74 75 76 77 78 79 80 81 |
# File 'lib/eaglecad/sheet.rb', line 73 def to_xml REXML::Element.new('instance').tap do |element| element.add_attributes({'part' => part, 'gate' => gate, 'x' => origin.x, 'y' => origin.y}) element.add_attribute('smashed', 'yes') if smashed element.add_attribute('rot', rotation) attributes.each {|attribute| element.add_element attribute.to_xml } end end |