def set_layout(layout)
      case layout
      when Array
        $log.error  "NIL in window constructor" if layout.include? nil
        raise ArgumentError, "Nil in window constructor" if layout.include? nil
        # NOTE this is just setting, and not replacing zero with max values
        @height, @width, @top, @left = *layout
        raise ArgumentError, "Nil in window constructor" if @top.nil? || @left.nil?

        @layout = { :height => @height, :width => @width, :top => @top, :left => @left }
      when Hash
        @layout = layout

        [:height, :width, :top, :left].each do |name|
          instance_variable_set("@#{name}", @layout[name])
        end
      end
    end
def set_layout(layout)
      case layout
      when Array
        $log.error  "NIL in window constructor" if layout.include? nil
        raise ArgumentError, "Nil in window constructor" if layout.include? nil
        # NOTE this is just setting, and not replacing zero with max values
        @height, @width, @top, @left = *layout
        raise ArgumentError, "Nil in window constructor" if @top.nil? || @left.nil?

        @layout = { :height => @height, :width => @width, :top => @top, :left => @left }
      when Hash
        @layout = layout

        [:height, :width, :top, :left].each do |name|
          instance_variable_set("@#{name}", @layout[name])
        end
      end
    end
Creating variables case of array, we still create the hash
 @param array or hash containing h w t and l