Module: EagleCAD

Defined in:
lib/eaglecad.rb,
lib/eaglecad/part.rb,
lib/eaglecad/board.rb,
lib/eaglecad/layer.rb,
lib/eaglecad/sheet.rb,
lib/eaglecad/symbol.rb,
lib/eaglecad/drawing.rb,
lib/eaglecad/library.rb,
lib/eaglecad/package.rb,
lib/eaglecad/geometry.rb,
lib/eaglecad/attribute.rb,
lib/eaglecad/clearance.rb,
lib/eaglecad/deviceset.rb,
lib/eaglecad/schematic.rb,
lib/eaglecad/design_rules.rb

Defined Under Namespace

Modules: Geometry Classes: Attribute, Board, Clearance, DesignRules, DeviceSet, Drawing, Layer, Library, Package, Part, Schematic, Sheet, Symbol

Constant Summary collapse

Point =
::Geometry::Point
Size =
::Geometry::Size

Class Method Summary collapse

Class Method Details

.parse(document) ⇒ Drawing

Returns A new Drawing, or nil if there was an error.

Parameters:

  • An (REXML::Document)

    XML document to parse

Returns:



14
15
16
# File 'lib/eaglecad.rb', line 14

def self.parse(document)
	Drawing.from_xml(document.root.elements['drawing'])
end

.read(filename) ⇒ Drawing

Load and parse the given Schematic or Board file

Returns:



8
9
10
# File 'lib/eaglecad.rb', line 8

def self.read(filename)
	parse(REXML::Document.new File.open(filename))
end