Sha256: d2af093230b3b419cdb6854258e5e7aa3feed23626ba11adc07a371eb6551da2

Contents?: true

Size: 479 Bytes

Versions: 2

Compression:

Stored size: 479 Bytes

Contents

# -*- encoding: utf-8 -*-

module Genit

  # Modify head link tags.
  class HeadLinkBuilder < Relativizer
    
    # Public: Build the document head link tags of a particular page.
    #
    # page_name - The string filename of the page.
    #
    # Returns the modified Nokogiri::XML::Document
    def build_for_page page_name
      build page_name, @document.css("head link")
    end
    
    private
    
    def update link
      super link, "href"
    end
    
  end
  
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
genit-1.0.1 lib/genit/builders/head_link_builder.rb
genit-1.0 lib/genit/builders/head_link_builder.rb