Sha256: 81a602a0593b5cf7b81ab73d4fd78c72ac03cbd115c20ed364012f9156a14a75

Contents?: true

Size: 1.01 KB

Versions: 580

Compression:

Stored size: 1.01 KB

Contents

module Nokogiri
  module HTML
    ###
    # Nokogiri HTML builder is used for building HTML documents.  It is very
    # similar to the Nokogiri::XML::Builder.  In fact, you should go read the
    # documentation for Nokogiri::XML::Builder before reading this
    # documentation.
    #
    # == Synopsis:
    #
    # Create an HTML document with a body that has an onload attribute, and a
    # span tag with a class of "bold" that has content of "Hello world".
    #
    #   builder = Nokogiri::HTML::Builder.new do |doc|
    #     doc.html {
    #       doc.body(:onload => 'some_func();') {
    #         doc.span.bold {
    #           doc.text "Hello world"
    #         }
    #       }
    #     }
    #   end
    #   puts builder.to_html
    #
    # The HTML builder inherits from the XML builder, so make sure to read the
    # Nokogiri::XML::Builder documentation.
    class Builder < Nokogiri::XML::Builder
      ###
      # Convert the builder to HTML
      def to_html
        @doc.to_html
      end
    end
  end
end

Version data entries

580 entries across 551 versions & 51 rubygems

Version Path
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/3.0.0/gems/tdiary-5.1.4/vendor/bundle/ruby/2.7.0/gems/nokogiri-1.10.10/lib/nokogiri/html/builder.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/3.0.0/gems/nokogiri-1.10.10/lib/nokogiri/html/builder.rb
tdiary-5.1.5 vendor/bundle/ruby/3.0.0/gems/nokogiri-1.10.10/lib/nokogiri/html/builder.rb
tdiary-5.1.5 vendor/bundle/ruby/3.0.0/gems/tdiary-5.1.4/vendor/bundle/ruby/2.7.0/gems/nokogiri-1.10.10/lib/nokogiri/html/builder.rb
video_chat_get-0.1.9 vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/html/builder.rb
tdiary-5.1.4 vendor/bundle/ruby/2.7.0/gems/nokogiri-1.10.10/lib/nokogiri/html/builder.rb
video_chat_get-0.1.6 vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/html/builder.rb
tdiary-5.1.3 vendor/bundle/ruby/2.6.0/gems/nokogiri-1.10.9/lib/nokogiri/html/builder.rb
tdiary-5.1.3 vendor/bundle/ruby/2.7.0/gems/nokogiri-1.10.10/lib/nokogiri/html/builder.rb
video_chat_get-0.1.5 vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/html/builder 2.rb
video_chat_get-0.1.5 vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/html/builder.rb
video_chat_get-0.1.5 vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/html/builder 3.rb
video_chat_get-0.1.4 vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/html/builder.rb
metanorma-cli-1.3.4 gems/ruby/2.6.0/gems/nokogiri-1.10.10/lib/nokogiri/html/builder.rb
metanorma-cli-1.3.3.1 gems/ruby/2.6.0/gems/nokogiri-1.10.10/lib/nokogiri/html/builder.rb
video_chat_get-0.1.3 vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/html/builder.rb
video_chat_get-0.1.2 vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/html/builder.rb
video_chat_get-0.1.1 vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/html/builder.rb
video_chat_get-0.1.0 vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/html/builder.rb
nokogiri-1.10.10 lib/nokogiri/html/builder.rb