Class: EagleCAD::Sheet::PinReference
- Inherits:
-
Struct
- Object
- Struct
- EagleCAD::Sheet::PinReference
- Defined in:
- lib/eaglecad/sheet.rb
Instance Attribute Summary collapse
-
#gate ⇒ Object
Returns the value of attribute gate.
-
#part ⇒ Object
Returns the value of attribute part.
-
#pin ⇒ Object
Returns the value of attribute pin.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#gate ⇒ Object
Returns the value of attribute gate
9 10 11 |
# File 'lib/eaglecad/sheet.rb', line 9 def gate @gate end |
#part ⇒ Object
Returns the value of attribute part
9 10 11 |
# File 'lib/eaglecad/sheet.rb', line 9 def part @part end |
#pin ⇒ Object
Returns the value of attribute pin
9 10 11 |
# File 'lib/eaglecad/sheet.rb', line 9 def pin @pin end |
Class Method Details
.from_xml(element) ⇒ Object
10 11 12 |
# File 'lib/eaglecad/sheet.rb', line 10 def self.from_xml(element) Sheet::PinReference.new element.attributes['part'], element.attributes['gate'], element.attributes['pin'] end |
Instance Method Details
#to_xml ⇒ Object
14 15 16 17 18 |
# File 'lib/eaglecad/sheet.rb', line 14 def to_xml REXML::Element.new('pinref').tap do |element| element.add_attributes('gate' => gate, 'part' => part, 'pin' => pin) end end |