class Gdsii::Elements

Class to hold a collection of Element objects. This is used in the Structure class BNF.

Elements include: Boundary, Path, SRef, ARef, Text, Node, Box

Public Class Methods

new(elements=[]) click to toggle source

Create an Elements object.

Calls superclass method
# File lib/gdsii/element.rb, line 152
def initialize(elements=[])
  super()
  @records[Element] = @list = elements
end

Protected Instance Methods

validate_addition(object) click to toggle source

Used by Access::EnumerableGroup to validate addition

# File lib/gdsii/element.rb, line 165
def validate_addition(object)
  unless object.kind_of?(Element)
    raise TypeError, "Invalid addition: #{object.class}; expecting Gdsii::Element"
  end
end