Class: SilkLayout::Layout::Root

Inherits:
Object
  • Object
show all
Defined in:
lib/silk_layout/layout/root.rb

Class Method Summary collapse

Class Method Details

.find(box) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/silk_layout/layout/root.rb', line 6

def self.find(box)
  current = box
  while current.node&.tag == "html" || current.node&.tag == "body"
    current = current.children.first
  end
  current
end