Class: Slimmer::Processors::InsideHeaderInserter

Inherits:
Object
  • Object
show all
Defined in:
lib/slimmer/processors/inside_header_inserter.rb

Instance Method Summary collapse

Instance Method Details

#filter(src, dest) ⇒ Object



3
4
5
6
7
8
9
10
# File 'lib/slimmer/processors/inside_header_inserter.rb', line 3

def filter(src, dest)
  insertion = src.at_css(".slimmer-inside-header")

  if insertion
     = dest.at_css(".header-logo")
    .add_next_sibling(insertion.inner_html) unless .nil?
  end
end