class HexaPDF::Layout::Style::Quad

or borders.
left. Quads are normally used for holding values pertaining to boxes, like margins, paddings
A Quad holds four values and allows them to be accessed by the names top, right, bottom and

def initialize(obj)

Creates a new Quad object. See #set for more information.
def initialize(obj)
  set(obj)
end

def set(obj)

and left to the fourth value.
* Four or more values: Top is set to the first, right to the second, bottom to the third
third value.
* Three values: Top is set to the first, left and right to the second, and bottom to the
value.
* Two values: Top and bottom are set to the first value, left and right to the second
* One value: All attributes are set to the same value.

* If an array is provided, it depends on the number of elemens in it:

* If a Quad is provided, its values are used.

an array with one value was given.
* If a single value is provided that is neither a Quad nor an array, it is handled as if

Sets all values of the quad.

quad.set(quad)
quad.set(array)
quad.set(value)
:call-seq:
def set(obj)
  case obj
  when Quad
    @top = obj.top
    @bottom = obj.bottom
    @left = obj.left
    @right = obj.right
  when Array
    @top = obj[0]
    @bottom = obj[2] || obj[0]
    @left = obj[3] || obj[1] || obj[0]
    @right = obj[1] || obj[0]
  else
    @top = @bottom = @left = @right = obj
  end
end

def simple?

Returns +true+ if the quad effectively contains only one value.
def simple?
  @top == @bottom && @top == @left && @top == @right
end