Sha256: 36b919ff6996de495be1cb625f3af54bc20015da6391b2f162ed89d726d855dd

Contents?: true

Size: 1.04 KB

Versions: 459

Compression:

Stored size: 1.04 KB

Contents

# frozen_string_literal: true

module Nokogiri
  module HTML4
    ###
    # 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::HTML4::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

459 entries across 457 versions & 11 rubygems

Version Path
minato_ruby_api_client-0.2.2 vendor/bundle/ruby/3.2.0/gems/nokogiri-1.16.6-x86_64-linux/lib/nokogiri/html4/builder.rb
nokogiri-1.18.1-x86_64-linux-musl lib/nokogiri/html4/builder.rb
nokogiri-1.18.1-x86_64-linux-gnu lib/nokogiri/html4/builder.rb
nokogiri-1.18.1-x86_64-darwin lib/nokogiri/html4/builder.rb
nokogiri-1.18.1-x64-mingw-ucrt lib/nokogiri/html4/builder.rb
nokogiri-1.18.1-java lib/nokogiri/html4/builder.rb
nokogiri-1.18.1 lib/nokogiri/html4/builder.rb
nokogiri-1.18.1-arm-linux-musl lib/nokogiri/html4/builder.rb
nokogiri-1.18.1-arm-linux-gnu lib/nokogiri/html4/builder.rb
nokogiri-1.18.1-arm64-darwin lib/nokogiri/html4/builder.rb
nokogiri-1.18.1-aarch64-linux-musl lib/nokogiri/html4/builder.rb
nokogiri-1.18.1-aarch64-linux-gnu lib/nokogiri/html4/builder.rb
nokogiri-1.18.0-x86_64-linux-musl lib/nokogiri/html4/builder.rb
nokogiri-1.18.0-x86_64-linux-gnu lib/nokogiri/html4/builder.rb
nokogiri-1.18.0-x86_64-darwin lib/nokogiri/html4/builder.rb
nokogiri-1.18.0-x64-mingw-ucrt lib/nokogiri/html4/builder.rb
nokogiri-1.18.0-java lib/nokogiri/html4/builder.rb
nokogiri-1.18.0 lib/nokogiri/html4/builder.rb
nokogiri-1.18.0-arm-linux-musl lib/nokogiri/html4/builder.rb
nokogiri-1.18.0-arm-linux-gnu lib/nokogiri/html4/builder.rb