| Class | Origami::Rectangle |
| In: |
sources/parser/misc.rb
|
| Parent: | Array |
# File sources/parser/misc.rb, line 138
138: def [](coords)
139: corners = coords.values_at(:llx, :lly, :urx, :ury)
140:
141: unless corners.all? { |corner| corner.is_a?(Numeric) }
142: raise TypeError, "All coords must be numbers"
143: end
144:
145: Rectangle.new(*corners)
146: end