2022-05-02 20:59:59 +01:00
|
|
|
# typed: true
|
|
|
|
|
2020-08-09 11:32:26 +01:00
|
|
|
# DO NOT EDIT MANUALLY
|
|
|
|
# This is an autogenerated file for types exported from the `hpricot` gem.
|
2021-09-17 19:28:50 +01:00
|
|
|
# Please instead update this file by running `bin/tapioca gem hpricot`.
|
2020-06-14 11:40:07 +05:30
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# source://hpricot//lib/hpricot/tag.rb#1
|
2021-09-10 21:21:17 +01:00
|
|
|
module Hpricot
|
|
|
|
class << self
|
2023-12-14 15:34:15 +00:00
|
|
|
# Hpricot::XML parses <i>input</i>, disregarding all the HTML rules
|
|
|
|
# and returning a document tree.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/parse.rb#20
|
2021-09-10 21:21:17 +01:00
|
|
|
def XML(input = T.unsafe(nil), opts = T.unsafe(nil), &blk); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2021-09-10 21:21:17 +01:00
|
|
|
def buffer_size; end
|
|
|
|
def buffer_size=(_arg0); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/builder.rb#15
|
2021-09-10 21:21:17 +01:00
|
|
|
def build(ele = T.unsafe(nil), assigns = T.unsafe(nil), &blk); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2021-09-10 21:21:17 +01:00
|
|
|
def css(_arg0, _arg1, _arg2); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# :stopdoc:
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/parse.rb#27
|
2021-09-10 21:21:17 +01:00
|
|
|
def make(input = T.unsafe(nil), opts = T.unsafe(nil), &blk); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Hpricot.parse parses <i>input</i> and return a document tree.
|
|
|
|
# represented by Hpricot::Doc.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/parse.rb#14
|
2021-09-10 21:21:17 +01:00
|
|
|
def parse(input = T.unsafe(nil), opts = T.unsafe(nil), &blk); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2021-09-10 21:21:17 +01:00
|
|
|
def scan(*_arg0); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# XML unescape
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/builder.rb#8
|
2021-09-10 21:21:17 +01:00
|
|
|
def uxs(str); end
|
|
|
|
end
|
|
|
|
end
|
2020-06-14 11:40:07 +05:30
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# Common sets of attributes.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/tags.rb#7
|
2021-09-10 21:21:17 +01:00
|
|
|
Hpricot::AttrCore = T.let(T.unsafe(nil), Array)
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/tags.rb#9
|
2021-09-10 21:21:17 +01:00
|
|
|
Hpricot::AttrEvents = T.let(T.unsafe(nil), Array)
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/tags.rb#11
|
2021-09-10 21:21:17 +01:00
|
|
|
Hpricot::AttrFocus = T.let(T.unsafe(nil), Array)
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/tags.rb#12
|
2021-09-10 21:21:17 +01:00
|
|
|
Hpricot::AttrHAlign = T.let(T.unsafe(nil), Array)
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/tags.rb#8
|
2021-09-10 21:21:17 +01:00
|
|
|
Hpricot::AttrI18n = T.let(T.unsafe(nil), Array)
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/tags.rb#13
|
2021-09-10 21:21:17 +01:00
|
|
|
Hpricot::AttrVAlign = T.let(T.unsafe(nil), Array)
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# source://hpricot//lib/hpricot/tag.rb#41
|
2021-09-10 21:21:17 +01:00
|
|
|
class Hpricot::Attributes
|
2023-12-14 15:34:15 +00:00
|
|
|
# @return [Attributes] a new instance of Attributes
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/tag.rb#43
|
2021-09-10 21:21:17 +01:00
|
|
|
def initialize(e); end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# source://hpricot//lib/hpricot/tag.rb#46
|
2021-09-10 21:21:17 +01:00
|
|
|
def [](k); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/tag.rb#49
|
2021-09-10 21:21:17 +01:00
|
|
|
def []=(k, v); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Returns the value of attribute element.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/tag.rb#42
|
2021-09-10 21:21:17 +01:00
|
|
|
def element; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Sets the attribute element
|
|
|
|
#
|
|
|
|
# @param value the value to set the attribute element to.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/tag.rb#42
|
2021-09-10 21:21:17 +01:00
|
|
|
def element=(_arg0); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/tag.rb#65
|
2021-09-10 21:21:17 +01:00
|
|
|
def inspect; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/tag.rb#52
|
2021-09-10 21:21:17 +01:00
|
|
|
def to_hash; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/tag.rb#62
|
2021-09-10 21:21:17 +01:00
|
|
|
def to_s; end
|
|
|
|
end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# source://hpricot//lib/hpricot/tags.rb#14
|
2021-09-10 21:21:17 +01:00
|
|
|
Hpricot::Attrs = T.let(T.unsafe(nil), Array)
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# BlankSlate provides an abstract base class with no predefined
|
|
|
|
# methods (except for <tt>\_\_send__</tt> and <tt>\_\_id__</tt>).
|
|
|
|
# BlankSlate is useful as a base class when writing classes that
|
|
|
|
# depend upon <tt>method_missing</tt> (e.g. dynamic proxies).
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/blankslate.rb#17
|
2021-09-10 21:21:17 +01:00
|
|
|
class Hpricot::BlankSlate
|
|
|
|
class << self
|
2023-12-14 15:34:15 +00:00
|
|
|
# Hide the method named +name+ in the BlankSlate class. Don't
|
|
|
|
# hide +instance_eval+ or any method beginning with "__".
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/blankslate.rb#22
|
2021-09-10 21:21:17 +01:00
|
|
|
def hide(name); end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# source://hpricot//lib/hpricot/tag.rb#124
|
2021-09-10 21:21:17 +01:00
|
|
|
class Hpricot::BogusETag
|
|
|
|
include ::Hpricot
|
|
|
|
include ::Hpricot::Node
|
|
|
|
include ::Hpricot::Leaf
|
|
|
|
include ::Hpricot::Traverse
|
|
|
|
include ::Hpricot::Leaf::Trav
|
|
|
|
include ::Hpricot::BogusETag::Trav
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# @return [BogusETag] a new instance of BogusETag
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/tag.rb#125
|
2021-09-10 21:21:17 +01:00
|
|
|
def initialize(name); end
|
|
|
|
|
|
|
|
def clear_raw; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/tag.rb#126
|
2021-09-10 21:21:17 +01:00
|
|
|
def output(out, opts = T.unsafe(nil)); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/inspect.rb#90
|
2021-09-10 21:21:17 +01:00
|
|
|
def pretty_print(q); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2021-09-10 21:21:17 +01:00
|
|
|
def raw_string; end
|
|
|
|
end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# source://hpricot//lib/hpricot/modules.rb#36
|
2021-09-10 21:21:17 +01:00
|
|
|
module Hpricot::BogusETag::Trav
|
|
|
|
include ::Hpricot::Traverse
|
|
|
|
include ::Hpricot::Leaf::Trav
|
|
|
|
end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# source://hpricot//lib/hpricot/builder.rb#24
|
2021-09-10 21:21:17 +01:00
|
|
|
module Hpricot::Builder
|
2023-12-14 15:34:15 +00:00
|
|
|
# Write a +string+ to the HTML stream without escaping it.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/builder.rb#55
|
2021-09-10 21:21:17 +01:00
|
|
|
def <<(string); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2021-09-10 21:21:17 +01:00
|
|
|
def a(*args, &block); end
|
|
|
|
def abbr(*args, &block); end
|
|
|
|
def acronym(*args, &block); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/builder.rb#42
|
2021-09-10 21:21:17 +01:00
|
|
|
def add_child(ele); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2021-09-10 21:21:17 +01:00
|
|
|
def address(*args, &block); end
|
|
|
|
def applet(*args, &block); end
|
|
|
|
def area(*args, &block); end
|
|
|
|
def b(*args, &block); end
|
|
|
|
def base(*args, &block); end
|
|
|
|
def basefont(*args, &block); end
|
|
|
|
def bdo(*args, &block); end
|
|
|
|
def big(*args, &block); end
|
|
|
|
def blockquote(*args, &block); end
|
|
|
|
def body(*args, &block); end
|
|
|
|
def br(*args, &block); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/builder.rb#121
|
2021-09-10 21:21:17 +01:00
|
|
|
def build(*a, &b); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2021-09-10 21:21:17 +01:00
|
|
|
def button(*args, &block); end
|
|
|
|
def caption(*args, &block); end
|
|
|
|
def center(*args, &block); end
|
|
|
|
def cite(*args, &block); end
|
|
|
|
def code(*args, &block); end
|
|
|
|
def col(*args, &block); end
|
|
|
|
def colgroup(*args, &block); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Write a +string+ to the HTML stream without escaping it.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/builder.rb#55
|
2021-09-10 21:21:17 +01:00
|
|
|
def concat(string); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2021-09-10 21:21:17 +01:00
|
|
|
def dd(*args, &block); end
|
|
|
|
def del(*args, &block); end
|
|
|
|
def dfn(*args, &block); end
|
|
|
|
def dir(*args, &block); end
|
|
|
|
def div(*args, &block); end
|
|
|
|
def dl(*args, &block); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/builder.rb#149
|
2021-09-10 21:21:17 +01:00
|
|
|
def doctype(target, pub, sys); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2021-09-10 21:21:17 +01:00
|
|
|
def dt(*args, &block); end
|
|
|
|
def em(*args, &block); end
|
|
|
|
def fieldset(*args, &block); end
|
|
|
|
def font(*args, &block); end
|
|
|
|
def form(*args, &block); end
|
|
|
|
def h1(*args, &block); end
|
|
|
|
def h2(*args, &block); end
|
|
|
|
def h3(*args, &block); end
|
|
|
|
def h4(*args, &block); end
|
|
|
|
def h5(*args, &block); end
|
|
|
|
def h6(*args, &block); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Builds a head tag. Adds a <tt>meta</tt> tag inside with Content-Type
|
|
|
|
# set to <tt>text/html; charset=utf-8</tt>.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/builder.rb#157
|
2021-09-10 21:21:17 +01:00
|
|
|
def head(*args, &block); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2021-09-10 21:21:17 +01:00
|
|
|
def hr(*args, &block); end
|
|
|
|
def html(*args, &block); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Every HTML tag method goes through an html_tag call. So, calling <tt>div</tt> is equivalent
|
|
|
|
# to calling <tt>html_tag(:div)</tt>. All HTML tags in Hpricot's list are given generated wrappers
|
|
|
|
# for this method.
|
|
|
|
#
|
|
|
|
# If the @auto_validation setting is on, this method will check for many common mistakes which
|
|
|
|
# could lead to invalid XHTML.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/builder.rb#131
|
2021-09-10 21:21:17 +01:00
|
|
|
def html_tag(sym, *args, &block); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2021-09-10 21:21:17 +01:00
|
|
|
def i(*args, &block); end
|
|
|
|
def iframe(*args, &block); end
|
|
|
|
def img(*args, &block); end
|
|
|
|
def input(*args, &block); end
|
|
|
|
def ins(*args, &block); end
|
|
|
|
def isindex(*args, &block); end
|
|
|
|
def kbd(*args, &block); end
|
|
|
|
def label(*args, &block); end
|
|
|
|
def legend(*args, &block); end
|
|
|
|
def li(*args, &block); end
|
|
|
|
def link(*args, &block); end
|
|
|
|
def map(*args, &block); end
|
|
|
|
def menu(*args, &block); end
|
|
|
|
def meta(*args, &block); end
|
|
|
|
def noframes(*args, &block); end
|
|
|
|
def noscript(*args, &block); end
|
|
|
|
def object(*args, &block); end
|
|
|
|
def ol(*args, &block); end
|
|
|
|
def optgroup(*args, &block); end
|
|
|
|
def option(*args, &block); end
|
|
|
|
def p(*args, &block); end
|
|
|
|
def param(*args, &block); end
|
|
|
|
def pre(*args, &block); end
|
|
|
|
def q(*args, &block); end
|
|
|
|
def s(*args, &block); end
|
|
|
|
def samp(*args, &block); end
|
|
|
|
def script(*args, &block); end
|
|
|
|
def select(*args, &block); end
|
|
|
|
def small(*args, &block); end
|
|
|
|
def span(*args, &block); end
|
|
|
|
def strike(*args, &block); end
|
|
|
|
def strong(*args, &block); end
|
|
|
|
def style(*args, &block); end
|
|
|
|
def sub(*args, &block); end
|
|
|
|
def sup(*args, &block); end
|
|
|
|
def table(*args, &block); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Create a tag named +tag+. Other than the first argument which is the tag name,
|
|
|
|
# the arguments are the same as the tags implemented via method_missing.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/builder.rb#64
|
2021-09-10 21:21:17 +01:00
|
|
|
def tag!(tag, *args, &block); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2021-09-10 21:21:17 +01:00
|
|
|
def tbody(*args, &block); end
|
|
|
|
def td(*args, &block); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Write a +string+ to the HTML stream without escaping it.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/builder.rb#55
|
2021-09-10 21:21:17 +01:00
|
|
|
def text(string); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Write a +string+ to the HTML stream, making sure to escape it.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/builder.rb#50
|
2021-09-10 21:21:17 +01:00
|
|
|
def text!(string); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2021-09-10 21:21:17 +01:00
|
|
|
def textarea(*args, &block); end
|
|
|
|
def tfoot(*args, &block); end
|
|
|
|
def th(*args, &block); end
|
|
|
|
def thead(*args, &block); end
|
|
|
|
def title(*args, &block); end
|
|
|
|
def tr(*args, &block); end
|
|
|
|
def tt(*args, &block); end
|
|
|
|
def u(*args, &block); end
|
|
|
|
def ul(*args, &block); end
|
|
|
|
def var(*args, &block); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Builds an html tag with XHTML 1.0 Strict doctype instead.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/builder.rb#173
|
2021-09-10 21:21:17 +01:00
|
|
|
def xhtml_strict(attrs = T.unsafe(nil), &block); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Builds an html tag. An XML 1.0 instruction and an XHTML 1.0 Transitional doctype
|
|
|
|
# are prepended. Also assumes <tt>:xmlns => "http://www.w3.org/1999/xhtml",
|
|
|
|
# :lang => "en"</tt>.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/builder.rb#167
|
2021-09-10 21:21:17 +01:00
|
|
|
def xhtml_transitional(attrs = T.unsafe(nil), &block); end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# source://hpricot//lib/hpricot/builder.rb#180
|
2021-09-10 21:21:17 +01:00
|
|
|
def xhtml_html(attrs = T.unsafe(nil), &block); end
|
|
|
|
|
|
|
|
class << self
|
2023-12-14 15:34:15 +00:00
|
|
|
# source://hpricot//lib/hpricot/builder.rb#38
|
2021-09-10 21:21:17 +01:00
|
|
|
def set(option, value); end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# source://hpricot//lib/hpricot/tag.rb#152
|
2021-09-10 21:21:17 +01:00
|
|
|
class Hpricot::CData
|
|
|
|
include ::Hpricot
|
|
|
|
include ::Hpricot::Node
|
|
|
|
include ::Hpricot::Leaf
|
|
|
|
include ::Hpricot::Traverse
|
|
|
|
include ::Hpricot::Leaf::Trav
|
|
|
|
include ::Hpricot::CData::Trav
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# @return [CData] a new instance of CData
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/tag.rb#153
|
2021-09-10 21:21:17 +01:00
|
|
|
def initialize(content); end
|
|
|
|
|
|
|
|
def content; end
|
|
|
|
def content=(_arg0); end
|
|
|
|
def inner_text; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/tag.rb#158
|
2021-09-10 21:21:17 +01:00
|
|
|
def output(out, opts = T.unsafe(nil)); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/tag.rb#157
|
2021-09-10 21:21:17 +01:00
|
|
|
def raw_string; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2021-09-10 21:21:17 +01:00
|
|
|
def to_plain_text; end
|
|
|
|
def to_s; end
|
|
|
|
end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# source://hpricot//lib/hpricot/modules.rb#30
|
2021-09-10 21:21:17 +01:00
|
|
|
module Hpricot::CData::Trav
|
|
|
|
include ::Hpricot::Traverse
|
|
|
|
include ::Hpricot::Leaf::Trav
|
|
|
|
end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# source://hpricot//lib/hpricot/tag.rb#207
|
2021-09-10 21:21:17 +01:00
|
|
|
class Hpricot::Comment
|
|
|
|
include ::Hpricot
|
|
|
|
include ::Hpricot::Node
|
|
|
|
include ::Hpricot::Leaf
|
|
|
|
include ::Hpricot::Traverse
|
|
|
|
include ::Hpricot::Leaf::Trav
|
|
|
|
include ::Hpricot::Comment::Trav
|
|
|
|
|
|
|
|
def content; end
|
|
|
|
def content=(_arg0); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/tag.rb#210
|
2021-09-10 21:21:17 +01:00
|
|
|
def output(out, opts = T.unsafe(nil)); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/tag.rb#208
|
2021-09-10 21:21:17 +01:00
|
|
|
def pathname; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/tag.rb#209
|
2021-09-10 21:21:17 +01:00
|
|
|
def raw_string; end
|
|
|
|
end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# source://hpricot//lib/hpricot/modules.rb#35
|
2021-09-10 21:21:17 +01:00
|
|
|
module Hpricot::Comment::Trav
|
|
|
|
include ::Hpricot::Traverse
|
|
|
|
include ::Hpricot::Leaf::Trav
|
|
|
|
end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# source://hpricot//lib/hpricot/modules.rb#12
|
2021-09-10 21:21:17 +01:00
|
|
|
module Hpricot::Container
|
|
|
|
include ::Hpricot
|
|
|
|
include ::Hpricot::Node
|
|
|
|
end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# :startdoc:
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/modules.rb#26
|
2021-09-10 21:21:17 +01:00
|
|
|
module Hpricot::Container::Trav
|
|
|
|
include ::Hpricot::Traverse
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# Returns a list of CSS classes to which this element belongs.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#518
|
2021-09-10 21:21:17 +01:00
|
|
|
def classes; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Return all children of this node which can contain other
|
|
|
|
# nodes. This is a good way to get all HTML elements which
|
|
|
|
# aren't text, comment, doctype or processing instruction nodes.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#404
|
2021-09-10 21:21:17 +01:00
|
|
|
def containers; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# +each_child+ iterates over each child.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#498
|
2021-09-10 21:21:17 +01:00
|
|
|
def each_child(&block); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# +each_child_with_index+ iterates over each child.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#504
|
2021-09-10 21:21:17 +01:00
|
|
|
def each_child_with_index(&block); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# +each_hyperlink+ traverses hyperlinks such as HTML href attribute
|
|
|
|
# of A element.
|
|
|
|
#
|
|
|
|
# It yields Hpricot::Text.
|
|
|
|
#
|
|
|
|
# Note that +each_hyperlink+ yields HTML href attribute of BASE element.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#614
|
2021-09-10 21:21:17 +01:00
|
|
|
def each_hyperlink; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# +each_hyperlink_uri+ traverses hyperlinks such as HTML href attribute
|
|
|
|
# of A element.
|
|
|
|
#
|
|
|
|
# It yields Hpricot::Text and URI for each hyperlink.
|
|
|
|
#
|
|
|
|
# The URI objects are created with a base URI which is given by
|
|
|
|
# HTML BASE element or the argument ((|base_uri|)).
|
|
|
|
# +each_hyperlink_uri+ doesn't yields href of the BASE element.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#591
|
2021-09-10 21:21:17 +01:00
|
|
|
def each_hyperlink_uri(base_uri = T.unsafe(nil)); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# +each_uri+ traverses hyperlinks such as HTML href attribute
|
|
|
|
# of A element.
|
|
|
|
#
|
|
|
|
# It yields URI for each hyperlink.
|
|
|
|
#
|
|
|
|
# The URI objects are created with a base URI which is given by
|
|
|
|
# HTML BASE element or the argument ((|base_uri|)).
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#628
|
2021-09-10 21:21:17 +01:00
|
|
|
def each_uri(base_uri = T.unsafe(nil)); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# +filter+ rebuilds the tree without some components.
|
|
|
|
#
|
|
|
|
# node.filter {|descendant_node| predicate } -> node
|
|
|
|
# loc.filter {|descendant_loc| predicate } -> node
|
|
|
|
#
|
|
|
|
# +filter+ yields each node except top node.
|
|
|
|
# If given block returns false, corresponding node is dropped.
|
|
|
|
# If given block returns true, corresponding node is retained and
|
|
|
|
# inner nodes are examined.
|
|
|
|
#
|
|
|
|
# +filter+ returns an node.
|
|
|
|
# It doesn't return location object even if self is location object.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#719
|
2021-09-10 21:21:17 +01:00
|
|
|
def filter(&block); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# +find_element+ searches an element which universal name is specified by
|
|
|
|
# the arguments.
|
|
|
|
# It returns nil if not found.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#512
|
2021-09-10 21:21:17 +01:00
|
|
|
def find_element(*names); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Find sibling elements which follow the current one. Like the other "sibling" methods, this weeds
|
|
|
|
# out text and comment nodes.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#435
|
2021-09-10 21:21:17 +01:00
|
|
|
def following_siblings; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#522
|
2021-09-10 21:21:17 +01:00
|
|
|
def get_element_by_id(id); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#531
|
2021-09-10 21:21:17 +01:00
|
|
|
def get_elements_by_tag_name(*a); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Insert +nodes+, an array of HTML elements or a single element,
|
|
|
|
# after the node +ele+, a child of the current node.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#486
|
2021-09-10 21:21:17 +01:00
|
|
|
def insert_after(nodes, ele); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Insert +nodes+, an array of HTML elements or a single element,
|
|
|
|
# before the node +ele+, a child of the current node.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#474
|
2021-09-10 21:21:17 +01:00
|
|
|
def insert_before(nodes, ele); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Returns the container node neighboring this node to the south: just below it.
|
|
|
|
# By "container" node, I mean: this method does not find text nodes or comments or cdata or any of that.
|
|
|
|
# See Hpricot::Traverse#next_node if you need to hunt out all kinds of nodes.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#411
|
2021-09-10 21:21:17 +01:00
|
|
|
def next_sibling; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Find all preceding sibling elements. Like the other "sibling" methods, this weeds
|
|
|
|
# out text and comment nodes.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#427
|
2021-09-10 21:21:17 +01:00
|
|
|
def preceding_siblings; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Returns the container node neighboring this node to the north: just above it.
|
|
|
|
# By "container" node, I mean: this method does not find text nodes or comments or cdata or any of that.
|
|
|
|
# See Hpricot::Traverse#previous_node if you need to hunt out all kinds of nodes.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#419
|
2021-09-10 21:21:17 +01:00
|
|
|
def previous_sibling; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Replace +old+, a child of the current node, with +new+ node.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#467
|
2021-09-10 21:21:17 +01:00
|
|
|
def replace_child(old, new); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Puts together an array of neighboring sibling elements based on their proximity
|
|
|
|
# to this element.
|
|
|
|
#
|
|
|
|
# This method accepts ranges and sets of numbers.
|
|
|
|
#
|
|
|
|
# ele.siblings_at(-3..-1, 1..3) # gets three elements before and three after
|
|
|
|
# ele.siblings_at(1, 5, 7) # gets three elements at offsets below the current element
|
|
|
|
# ele.siblings_at(0, 5..6) # the current element and two others
|
|
|
|
#
|
|
|
|
# Like the other "sibling" methods, this doesn't find text and comment nodes.
|
|
|
|
# Use nodes_at to include those nodes.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#452
|
2021-09-10 21:21:17 +01:00
|
|
|
def siblings_at(*pos); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#688
|
2021-09-10 21:21:17 +01:00
|
|
|
def traverse_text_internal(&block); end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#540
|
2021-09-10 21:21:17 +01:00
|
|
|
def each_hyperlink_attribute; end
|
|
|
|
end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# source://hpricot//lib/hpricot/modules.rb#3
|
2021-09-10 21:21:17 +01:00
|
|
|
class Hpricot::Context
|
|
|
|
include ::Hpricot
|
|
|
|
end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# Class used by Markaby::Builder to store element options. Methods called
|
|
|
|
# against the CssProxy object are added as element classes or IDs.
|
|
|
|
#
|
|
|
|
# See the README for examples.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/builder.rb#192
|
2021-09-10 21:21:17 +01:00
|
|
|
class Hpricot::CssProxy < ::Hpricot::BlankSlate
|
2023-12-14 15:34:15 +00:00
|
|
|
# Creates a CssProxy object.
|
|
|
|
#
|
|
|
|
# @return [CssProxy] a new instance of CssProxy
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/builder.rb#195
|
2021-09-10 21:21:17 +01:00
|
|
|
def initialize(builder, sym); end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# Adds attributes to an element. Bang methods set the :id attribute.
|
|
|
|
# Other methods add to the :class attribute.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/builder.rb#201
|
2021-09-10 21:21:17 +01:00
|
|
|
def method_missing(id_or_class, *args, &block); end
|
|
|
|
end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# :stopdoc:
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/tag.rb#4
|
2021-09-10 21:21:17 +01:00
|
|
|
class Hpricot::Doc
|
|
|
|
include ::Hpricot
|
|
|
|
include ::Hpricot::Node
|
|
|
|
include ::Hpricot::Container
|
|
|
|
include ::Hpricot::Traverse
|
|
|
|
include ::Hpricot::Container::Trav
|
|
|
|
include ::Hpricot::Doc::Trav
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# source://hpricot//lib/hpricot/tag.rb#14
|
2021-09-10 21:21:17 +01:00
|
|
|
def altered!; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://pp/0.3.0/pp.rb#356
|
2021-09-10 21:21:17 +01:00
|
|
|
def inspect; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/tag.rb#15
|
2021-09-10 21:21:17 +01:00
|
|
|
def inspect_tree; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/tag.rb#11
|
2021-09-10 21:21:17 +01:00
|
|
|
def make(input = T.unsafe(nil), &blk); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/tag.rb#5
|
2021-09-10 21:21:17 +01:00
|
|
|
def output(out, opts = T.unsafe(nil)); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/inspect.rb#13
|
2021-09-10 21:21:17 +01:00
|
|
|
def pretty_print(q); end
|
|
|
|
end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# :stopdoc:
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/modules.rb#28
|
2021-09-10 21:21:17 +01:00
|
|
|
module Hpricot::Doc::Trav
|
|
|
|
include ::Hpricot::Traverse
|
|
|
|
include ::Hpricot::Container::Trav
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# +author+ searches author and return it as a text.
|
|
|
|
# It returns nil if not found.
|
|
|
|
#
|
|
|
|
# +author+ searchs following information.
|
|
|
|
#
|
|
|
|
# - <meta name="author" content="author-name"> in HTML
|
|
|
|
# - <link rev="made" title="author-name"> in HTML
|
|
|
|
# - <dc:creator>author-name</dc:creator> in RSS
|
|
|
|
# - <dc:publisher>author-name</dc:publisher> in RSS
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#761
|
2021-09-10 21:21:17 +01:00
|
|
|
def author; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#641
|
2021-09-10 21:21:17 +01:00
|
|
|
def css_path; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @raise [Hpricot::Error]
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#805
|
2021-09-10 21:21:17 +01:00
|
|
|
def root; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# +title+ searches title and return it as a text.
|
|
|
|
# It returns nil if not found.
|
|
|
|
#
|
|
|
|
# +title+ searchs following information.
|
|
|
|
#
|
|
|
|
# - <title>...</title> in HTML
|
|
|
|
# - <title>...</title> in RSS
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#744
|
2021-09-10 21:21:17 +01:00
|
|
|
def title; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#635
|
2021-09-10 21:21:17 +01:00
|
|
|
def traverse_all_element(&block); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#660
|
2021-09-10 21:21:17 +01:00
|
|
|
def traverse_some_element(name_set, &block); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#638
|
2021-09-10 21:21:17 +01:00
|
|
|
def xpath; end
|
|
|
|
end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# source://hpricot//lib/hpricot/tag.rb#179
|
2021-09-10 21:21:17 +01:00
|
|
|
class Hpricot::DocType
|
|
|
|
include ::Hpricot
|
|
|
|
include ::Hpricot::Node
|
|
|
|
include ::Hpricot::Leaf
|
|
|
|
include ::Hpricot::Traverse
|
|
|
|
include ::Hpricot::Leaf::Trav
|
|
|
|
include ::Hpricot::DocType::Trav
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# @return [DocType] a new instance of DocType
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/tag.rb#180
|
2021-09-10 21:21:17 +01:00
|
|
|
def initialize(target, pub, sys); end
|
|
|
|
|
|
|
|
def clear_raw; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/tag.rb#184
|
2021-09-10 21:21:17 +01:00
|
|
|
def output(out, opts = T.unsafe(nil)); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/tag.rb#183
|
2021-09-10 21:21:17 +01:00
|
|
|
def pathname; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2021-09-10 21:21:17 +01:00
|
|
|
def public_id; end
|
|
|
|
def public_id=(_arg0); end
|
|
|
|
def raw_string; end
|
|
|
|
def system_id; end
|
|
|
|
def system_id=(_arg0); end
|
|
|
|
def target; end
|
|
|
|
def target=(_arg0); end
|
|
|
|
end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# source://hpricot//lib/hpricot/modules.rb#33
|
2021-09-10 21:21:17 +01:00
|
|
|
module Hpricot::DocType::Trav
|
|
|
|
include ::Hpricot::Traverse
|
|
|
|
include ::Hpricot::Leaf::Trav
|
|
|
|
end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# source://hpricot//lib/hpricot/tag.rb#131
|
2021-09-10 21:21:17 +01:00
|
|
|
class Hpricot::ETag < ::Hpricot::BogusETag
|
|
|
|
include ::Hpricot::Tag
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# source://pp/0.3.0/pp.rb#356
|
2021-09-10 21:21:17 +01:00
|
|
|
def inspect; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/tag.rb#132
|
2021-09-10 21:21:17 +01:00
|
|
|
def output(out, opts = T.unsafe(nil)); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/inspect.rb#75
|
2021-09-10 21:21:17 +01:00
|
|
|
def pretty_print(q); end
|
|
|
|
end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# source://hpricot//lib/hpricot/tag.rb#70
|
2021-09-10 21:21:17 +01:00
|
|
|
class Hpricot::Elem
|
|
|
|
include ::Hpricot
|
|
|
|
include ::Hpricot::Node
|
|
|
|
include ::Hpricot::Container
|
|
|
|
include ::Hpricot::Traverse
|
|
|
|
include ::Hpricot::Container::Trav
|
|
|
|
include ::Hpricot::Elem::Trav
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# @return [Elem] a new instance of Elem
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/tag.rb#71
|
2021-09-10 21:21:17 +01:00
|
|
|
def initialize(tag, attrs = T.unsafe(nil), children = T.unsafe(nil), etag = T.unsafe(nil)); end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# source://hpricot//lib/hpricot/tag.rb#76
|
2021-09-10 21:21:17 +01:00
|
|
|
def attributes; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/tag.rb#110
|
2021-09-10 21:21:17 +01:00
|
|
|
def attributes_as_html; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2021-09-10 21:21:17 +01:00
|
|
|
def clear_raw; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @return [Boolean]
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/tag.rb#75
|
2021-09-10 21:21:17 +01:00
|
|
|
def empty?; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://pp/0.3.0/pp.rb#356
|
2021-09-10 21:21:17 +01:00
|
|
|
def inspect; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/tag.rb#118
|
2021-09-10 21:21:17 +01:00
|
|
|
def inspect_tree(depth = T.unsafe(nil)); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/tag.rb#93
|
2021-09-10 21:21:17 +01:00
|
|
|
def output(out, opts = T.unsafe(nil)); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/tag.rb#92
|
2021-09-10 21:21:17 +01:00
|
|
|
def pathname; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/inspect.rb#38
|
2021-09-10 21:21:17 +01:00
|
|
|
def pretty_print(q); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/inspect.rb#55
|
2021-09-10 21:21:17 +01:00
|
|
|
def pretty_print_stag(q); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/tag.rb#79
|
2021-09-10 21:21:17 +01:00
|
|
|
def to_plain_text; end
|
|
|
|
end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# source://hpricot//lib/hpricot/modules.rb#29
|
2021-09-10 21:21:17 +01:00
|
|
|
module Hpricot::Elem::Trav
|
|
|
|
include ::Hpricot::Traverse
|
|
|
|
include ::Hpricot::Container::Trav
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#818
|
2021-09-10 21:21:17 +01:00
|
|
|
def [](name); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#824
|
2021-09-10 21:21:17 +01:00
|
|
|
def []=(name, val); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#818
|
2021-09-10 21:21:17 +01:00
|
|
|
def get_attribute(name); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @return [Boolean]
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#815
|
2021-09-10 21:21:17 +01:00
|
|
|
def has_attribute?(name); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#830
|
2021-09-10 21:21:17 +01:00
|
|
|
def remove_attribute(name); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#824
|
2021-09-10 21:21:17 +01:00
|
|
|
def set_attribute(name, val); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @yield [_self]
|
|
|
|
# @yieldparam _self [Hpricot::Elem::Trav] the object that the method was called on
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#647
|
2021-09-10 21:21:17 +01:00
|
|
|
def traverse_all_element(&block); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# @yield [_self]
|
|
|
|
# @yieldparam _self [Hpricot::Elem::Trav] the object that the method was called on
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#666
|
2021-09-10 21:21:17 +01:00
|
|
|
def traverse_some_element(name_set, &block); end
|
|
|
|
end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# source://hpricot//lib/hpricot/htmlinfo.rb#59
|
2021-09-10 21:21:17 +01:00
|
|
|
Hpricot::ElementContent = T.let(T.unsafe(nil), Hash)
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/htmlinfo.rb#494
|
2021-09-10 21:21:17 +01:00
|
|
|
Hpricot::ElementExclusions = T.let(T.unsafe(nil), Hash)
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/htmlinfo.rb#486
|
2021-09-10 21:21:17 +01:00
|
|
|
Hpricot::ElementInclusions = T.let(T.unsafe(nil), Hash)
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# :stopdoc:
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/elements.rb#52
|
2021-09-10 21:21:17 +01:00
|
|
|
class Hpricot::Elements < ::Array
|
2023-12-14 15:34:15 +00:00
|
|
|
# Searches this list for the first element (or child of these elements) matching
|
|
|
|
# the CSS or XPath expression +expr+. Root is assumed to be the element scanned.
|
|
|
|
#
|
|
|
|
# See Hpricot::Container::Trav.at for more.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/elements.rb#67
|
2021-09-10 21:21:17 +01:00
|
|
|
def %(expr, &blk); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Searches this list for any elements (or children of these elements) matching
|
|
|
|
# the CSS or XPath expression +expr+. Root is assumed to be the element scanned.
|
|
|
|
#
|
|
|
|
# See Hpricot::Container::Trav.search for more.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/elements.rb#58
|
2021-09-10 21:21:17 +01:00
|
|
|
def /(*expr, &blk); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Adds the class to all matched elements.
|
|
|
|
#
|
|
|
|
# (doc/"p").add_class("bacon")
|
|
|
|
#
|
|
|
|
# Now all paragraphs will have class="bacon".
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/elements.rb#226
|
2021-09-10 21:21:17 +01:00
|
|
|
def add_class(class_name); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Just after each element in this list, add some HTML.
|
|
|
|
# Pass in an HTML +str+, which is turned into Hpricot elements.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/elements.rb#154
|
2021-09-10 21:21:17 +01:00
|
|
|
def after(str = T.unsafe(nil), &blk); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Add to the end of the contents inside each element in this list.
|
|
|
|
# Pass in an HTML +str+, which is turned into Hpricot elements.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/elements.rb#136
|
2021-09-10 21:21:17 +01:00
|
|
|
def append(str = T.unsafe(nil), &blk); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Searches this list for the first element (or child of these elements) matching
|
|
|
|
# the CSS or XPath expression +expr+. Root is assumed to be the element scanned.
|
|
|
|
#
|
|
|
|
# See Hpricot::Container::Trav.at for more.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/elements.rb#67
|
2021-09-10 21:21:17 +01:00
|
|
|
def at(expr, &blk); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Gets and sets attributes on all matched elements.
|
|
|
|
#
|
|
|
|
# Pass in a +key+ on its own and this method will return the string value
|
|
|
|
# assigned to that attribute for the first elements. Or +nil+ if the
|
|
|
|
# attribute isn't found.
|
|
|
|
#
|
|
|
|
# doc.search("a").attr("href")
|
|
|
|
# #=> "http://hacketyhack.net/"
|
|
|
|
#
|
|
|
|
# Or, pass in a +key+ and +value+. This will set an attribute for all
|
|
|
|
# matched elements.
|
|
|
|
#
|
|
|
|
# doc.search("p").attr("class", "basic")
|
|
|
|
#
|
|
|
|
# You may also use a Hash to set a series of attributes:
|
|
|
|
#
|
|
|
|
# (doc/"a").attr(:class => "basic", :href => "http://hackety.org/")
|
|
|
|
#
|
|
|
|
# Lastly, a block can be used to rewrite an attribute based on the element
|
|
|
|
# it belongs to. The block will pass in an element. Return from the block
|
|
|
|
# the new value of the attribute.
|
|
|
|
#
|
|
|
|
# records.attr("href") { |e| e['href'] + "#top" }
|
|
|
|
#
|
|
|
|
# This example adds a <tt>#top</tt> anchor to each link.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/elements.rb#205
|
2021-09-10 21:21:17 +01:00
|
|
|
def attr(key, value = T.unsafe(nil), &blk); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Add some HTML just previous to each element in this list.
|
|
|
|
# Pass in an HTML +str+, which is turned into Hpricot elements.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/elements.rb#148
|
2021-09-10 21:21:17 +01:00
|
|
|
def before(str = T.unsafe(nil), &blk); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Empty the elements in this list, by removing their insides.
|
|
|
|
#
|
|
|
|
# doc = Hpricot("<p> We have <i>so much</i> to say.</p>")
|
|
|
|
# doc.search("i").empty
|
|
|
|
# doc.to_html
|
|
|
|
# => "<p> We have <i></i> to say.</p>"
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/elements.rb#130
|
2021-09-10 21:21:17 +01:00
|
|
|
def empty; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/elements.rb#351
|
2021-09-10 21:21:17 +01:00
|
|
|
def filter(expr); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Returns an HTML fragment built of the contents of each element in this list.
|
|
|
|
#
|
|
|
|
# If a HTML +string+ is supplied, this method acts like inner_html=.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/elements.rb#86
|
2021-09-10 21:21:17 +01:00
|
|
|
def html(*string); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Replaces the contents of each element in this list. Supply an HTML +string+,
|
|
|
|
# which is loaded into Hpricot objects and inserted into every element in this
|
|
|
|
# list.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/elements.rb#99
|
2021-09-10 21:21:17 +01:00
|
|
|
def html=(string); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Returns an HTML fragment built of the contents of each element in this list.
|
|
|
|
#
|
|
|
|
# If a HTML +string+ is supplied, this method acts like inner_html=.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/elements.rb#86
|
2021-09-10 21:21:17 +01:00
|
|
|
def innerHTML(*string); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Replaces the contents of each element in this list. Supply an HTML +string+,
|
|
|
|
# which is loaded into Hpricot objects and inserted into every element in this
|
|
|
|
# list.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/elements.rb#99
|
2021-09-10 21:21:17 +01:00
|
|
|
def innerHTML=(string); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Returns an HTML fragment built of the contents of each element in this list.
|
|
|
|
#
|
|
|
|
# If a HTML +string+ is supplied, this method acts like inner_html=.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/elements.rb#86
|
2021-09-10 21:21:17 +01:00
|
|
|
def inner_html(*string); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Replaces the contents of each element in this list. Supply an HTML +string+,
|
|
|
|
# which is loaded into Hpricot objects and inserted into every element in this
|
|
|
|
# list.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/elements.rb#99
|
2021-09-10 21:21:17 +01:00
|
|
|
def inner_html=(string); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Returns an string containing the text contents of each element in this list.
|
|
|
|
# All HTML tags are removed.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/elements.rb#107
|
2021-09-10 21:21:17 +01:00
|
|
|
def inner_text; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://pp/0.3.0/pp.rb#356
|
2021-09-10 21:21:17 +01:00
|
|
|
def inspect; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/elements.rb#356
|
2021-09-10 21:21:17 +01:00
|
|
|
def not(expr); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Add to the start of the contents inside each element in this list.
|
|
|
|
# Pass in an HTML +str+, which is turned into Hpricot elements.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/elements.rb#142
|
2021-09-10 21:21:17 +01:00
|
|
|
def prepend(str = T.unsafe(nil), &blk); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/inspect.rb#6
|
2021-09-10 21:21:17 +01:00
|
|
|
def pretty_print(q); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Remove all elements in this list from the document which contains them.
|
|
|
|
#
|
|
|
|
# doc = Hpricot("<html>Remove this: <b>here</b></html>")
|
|
|
|
# doc.search("b").remove
|
|
|
|
# doc.to_html
|
|
|
|
# => "<html>Remove this: </html>"
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/elements.rb#119
|
2021-09-10 21:21:17 +01:00
|
|
|
def remove; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Remove an attribute from each of the matched elements.
|
|
|
|
#
|
|
|
|
# (doc/"input").remove_attr("disabled")
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/elements.rb#239
|
2021-09-10 21:21:17 +01:00
|
|
|
def remove_attr(name); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Removes a class from all matched elements.
|
|
|
|
#
|
|
|
|
# (doc/"span").remove_class("lightgrey")
|
|
|
|
#
|
|
|
|
# Or, to remove all classes:
|
|
|
|
#
|
|
|
|
# (doc/"span").remove_class
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/elements.rb#255
|
2021-09-10 21:21:17 +01:00
|
|
|
def remove_class(name = T.unsafe(nil)); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Searches this list for any elements (or children of these elements) matching
|
|
|
|
# the CSS or XPath expression +expr+. Root is assumed to be the element scanned.
|
|
|
|
#
|
|
|
|
# See Hpricot::Container::Trav.search for more.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/elements.rb#58
|
2021-09-10 21:21:17 +01:00
|
|
|
def search(*expr, &blk); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Gets and sets attributes on all matched elements.
|
|
|
|
#
|
|
|
|
# Pass in a +key+ on its own and this method will return the string value
|
|
|
|
# assigned to that attribute for the first elements. Or +nil+ if the
|
|
|
|
# attribute isn't found.
|
|
|
|
#
|
|
|
|
# doc.search("a").attr("href")
|
|
|
|
# #=> "http://hacketyhack.net/"
|
|
|
|
#
|
|
|
|
# Or, pass in a +key+ and +value+. This will set an attribute for all
|
|
|
|
# matched elements.
|
|
|
|
#
|
|
|
|
# doc.search("p").attr("class", "basic")
|
|
|
|
#
|
|
|
|
# You may also use a Hash to set a series of attributes:
|
|
|
|
#
|
|
|
|
# (doc/"a").attr(:class => "basic", :href => "http://hackety.org/")
|
|
|
|
#
|
|
|
|
# Lastly, a block can be used to rewrite an attribute based on the element
|
|
|
|
# it belongs to. The block will pass in an element. Return from the block
|
|
|
|
# the new value of the attribute.
|
|
|
|
#
|
|
|
|
# records.attr("href") { |e| e['href'] + "#top" }
|
|
|
|
#
|
|
|
|
# This example adds a <tt>#top</tt> anchor to each link.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/elements.rb#205
|
2021-09-10 21:21:17 +01:00
|
|
|
def set(key, value = T.unsafe(nil), &blk); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Returns an string containing the text contents of each element in this list.
|
|
|
|
# All HTML tags are removed.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/elements.rb#107
|
2021-09-10 21:21:17 +01:00
|
|
|
def text; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Convert this group of elements into a complete HTML fragment, returned as a
|
|
|
|
# string.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/elements.rb#78
|
2021-09-10 21:21:17 +01:00
|
|
|
def to_html; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Convert this group of elements into a complete HTML fragment, returned as a
|
|
|
|
# string.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/elements.rb#78
|
2021-09-10 21:21:17 +01:00
|
|
|
def to_s; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Wraps each element in the list inside the element created by HTML +str+.
|
|
|
|
# If more than one element is found in the string, Hpricot locates the
|
|
|
|
# deepest spot inside the first element.
|
|
|
|
#
|
|
|
|
# doc.search("a[@href]").
|
|
|
|
# wrap(%{<div class="link"><div class="link_inner"></div></div>})
|
|
|
|
#
|
|
|
|
# This code wraps every link on the page inside a +div.link+ and a +div.link_inner+ nest.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/elements.rb#166
|
2021-09-10 21:21:17 +01:00
|
|
|
def wrap(str = T.unsafe(nil), &blk); end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# source://hpricot//lib/hpricot/elements.rb#366
|
2021-09-10 21:21:17 +01:00
|
|
|
def copy_node(node, l); end
|
|
|
|
|
|
|
|
class << self
|
2023-12-14 15:34:15 +00:00
|
|
|
# Given two elements, attempt to gather an Elements array of everything between
|
|
|
|
# (and including) those two elements.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/elements.rb#319
|
2021-09-10 21:21:17 +01:00
|
|
|
def expand(ele1, ele2, excl = T.unsafe(nil)); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/elements.rb#274
|
2021-09-10 21:21:17 +01:00
|
|
|
def filter(nodes, expr, truth = T.unsafe(nil)); end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# " (for emacs)
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/elements.rb#268
|
2021-09-10 21:21:17 +01:00
|
|
|
Hpricot::Elements::ATTR_RE = T.let(T.unsafe(nil), Regexp)
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/elements.rb#269
|
2021-09-10 21:21:17 +01:00
|
|
|
Hpricot::Elements::BRACK_RE = T.let(T.unsafe(nil), Regexp)
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/elements.rb#272
|
2021-09-10 21:21:17 +01:00
|
|
|
Hpricot::Elements::CATCH_RE = T.let(T.unsafe(nil), Regexp)
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/elements.rb#271
|
2021-09-10 21:21:17 +01:00
|
|
|
Hpricot::Elements::CUST_RE = T.let(T.unsafe(nil), Regexp)
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/elements.rb#270
|
2021-09-10 21:21:17 +01:00
|
|
|
Hpricot::Elements::FUNC_RE = T.let(T.unsafe(nil), Regexp)
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Exception class used for any errors related to deficiencies in the system when
|
|
|
|
# handling the character encodings of a document.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/parse.rb#10
|
2021-09-10 21:21:17 +01:00
|
|
|
class Hpricot::EncodingError < ::StandardError; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/modules.rb#38
|
2021-09-10 21:21:17 +01:00
|
|
|
class Hpricot::Error < ::StandardError; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/tags.rb#3
|
2021-09-10 21:21:17 +01:00
|
|
|
Hpricot::FORM_TAGS = T.let(T.unsafe(nil), Array)
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# source://hpricot//lib/hpricot/modules.rb#16
|
2021-09-10 21:21:17 +01:00
|
|
|
module Hpricot::Leaf
|
|
|
|
include ::Hpricot
|
|
|
|
include ::Hpricot::Node
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# source://pp/0.3.0/pp.rb#356
|
2021-09-10 21:21:17 +01:00
|
|
|
def inspect; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/inspect.rb#20
|
2021-09-10 21:21:17 +01:00
|
|
|
def pretty_print(q); end
|
|
|
|
end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# source://hpricot//lib/hpricot/modules.rb#27
|
2021-09-10 21:21:17 +01:00
|
|
|
module Hpricot::Leaf::Trav
|
|
|
|
include ::Hpricot::Traverse
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# @yield [_self]
|
|
|
|
# @yieldparam _self [Hpricot::Leaf::Trav] the object that the method was called on
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#654
|
2021-09-10 21:21:17 +01:00
|
|
|
def traverse_all_element; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#673
|
2021-09-10 21:21:17 +01:00
|
|
|
def traverse_some_element(name_set); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#694
|
2021-09-10 21:21:17 +01:00
|
|
|
def traverse_text_internal; end
|
|
|
|
end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# source://hpricot//lib/hpricot/modules.rb#2
|
2021-09-10 21:21:17 +01:00
|
|
|
class Hpricot::Name
|
|
|
|
include ::Hpricot
|
|
|
|
end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# :stopdoc:
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/htmlinfo.rb#4
|
2021-09-10 21:21:17 +01:00
|
|
|
Hpricot::NamedCharacters = T.let(T.unsafe(nil), Hash)
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/htmlinfo.rb#57
|
2021-09-10 21:21:17 +01:00
|
|
|
Hpricot::NamedCharactersPattern = T.let(T.unsafe(nil), Regexp)
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# :startdoc:
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/tag.rb#20
|
2021-09-10 21:21:17 +01:00
|
|
|
module Hpricot::Node
|
|
|
|
include ::Hpricot
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# source://hpricot//lib/hpricot/tag.rb#33
|
2021-09-10 21:21:17 +01:00
|
|
|
def altered!; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/tag.rb#24
|
2021-09-10 21:21:17 +01:00
|
|
|
def clear_raw; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/tag.rb#21
|
2021-09-10 21:21:17 +01:00
|
|
|
def html_quote(str); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/tag.rb#25
|
2021-09-10 21:21:17 +01:00
|
|
|
def if_output(opts); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/tag.rb#36
|
2021-09-10 21:21:17 +01:00
|
|
|
def inspect_tree(depth = T.unsafe(nil)); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/tag.rb#32
|
2021-09-10 21:21:17 +01:00
|
|
|
def pathname; end
|
|
|
|
end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# source://hpricot//lib/hpricot/htmlinfo.rb#519
|
2021-09-10 21:21:17 +01:00
|
|
|
Hpricot::OmittedAttrName = T.let(T.unsafe(nil), Hash)
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2021-09-10 21:21:17 +01:00
|
|
|
class Hpricot::ParseError < ::StandardError; end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# source://hpricot//lib/hpricot/tag.rb#194
|
2021-09-10 21:21:17 +01:00
|
|
|
class Hpricot::ProcIns
|
|
|
|
include ::Hpricot
|
|
|
|
include ::Hpricot::Node
|
|
|
|
include ::Hpricot::Leaf
|
|
|
|
include ::Hpricot::Traverse
|
|
|
|
include ::Hpricot::Leaf::Trav
|
|
|
|
include ::Hpricot::ProcIns::Trav
|
|
|
|
|
|
|
|
def content; end
|
|
|
|
def content=(_arg0); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/tag.rb#197
|
2021-09-10 21:21:17 +01:00
|
|
|
def output(out, opts = T.unsafe(nil)); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/tag.rb#195
|
2021-09-10 21:21:17 +01:00
|
|
|
def pathname; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/tag.rb#196
|
2021-09-10 21:21:17 +01:00
|
|
|
def raw_string; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2021-09-10 21:21:17 +01:00
|
|
|
def target; end
|
|
|
|
def target=(_arg0); end
|
|
|
|
end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# source://hpricot//lib/hpricot/modules.rb#34
|
2021-09-10 21:21:17 +01:00
|
|
|
module Hpricot::ProcIns::Trav
|
|
|
|
include ::Hpricot::Traverse
|
|
|
|
include ::Hpricot::Leaf::Trav
|
|
|
|
end
|
|
|
|
|
|
|
|
Hpricot::ProcInsParse = T.let(T.unsafe(nil), Regexp)
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/tags.rb#4
|
2021-09-10 21:21:17 +01:00
|
|
|
Hpricot::SELF_CLOSING_TAGS = T.let(T.unsafe(nil), Array)
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# :stopdoc:
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/modules.rb#6
|
2021-09-10 21:21:17 +01:00
|
|
|
module Hpricot::Tag
|
|
|
|
include ::Hpricot
|
|
|
|
end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# source://hpricot//lib/hpricot/tag.rb#135
|
2021-09-10 21:21:17 +01:00
|
|
|
class Hpricot::Text
|
|
|
|
include ::Hpricot
|
|
|
|
include ::Hpricot::Node
|
|
|
|
include ::Hpricot::Leaf
|
|
|
|
include ::Hpricot::Traverse
|
|
|
|
include ::Hpricot::Leaf::Trav
|
|
|
|
include ::Hpricot::Text::Trav
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# @return [Text] a new instance of Text
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/tag.rb#136
|
2021-09-10 21:21:17 +01:00
|
|
|
def initialize(content); end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# source://hpricot//lib/hpricot/tag.rb#143
|
2021-09-10 21:21:17 +01:00
|
|
|
def <<(str); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2021-09-10 21:21:17 +01:00
|
|
|
def clear_raw; end
|
|
|
|
def content; end
|
|
|
|
def content=(_arg0); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/tag.rb#138
|
2021-09-10 21:21:17 +01:00
|
|
|
def inner_text; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/tag.rb#144
|
2021-09-10 21:21:17 +01:00
|
|
|
def output(out, opts = T.unsafe(nil)); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/tag.rb#137
|
2021-09-10 21:21:17 +01:00
|
|
|
def pathname; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/inspect.rb#84
|
2021-09-10 21:21:17 +01:00
|
|
|
def pretty_print(q); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2021-09-10 21:21:17 +01:00
|
|
|
def raw_string; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/tag.rb#138
|
2021-09-10 21:21:17 +01:00
|
|
|
def to_plain_text; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/tag.rb#138
|
2021-09-10 21:21:17 +01:00
|
|
|
def to_s; end
|
|
|
|
end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# source://hpricot//lib/hpricot/modules.rb#31
|
2021-09-10 21:21:17 +01:00
|
|
|
module Hpricot::Text::Trav
|
|
|
|
include ::Hpricot::Traverse
|
|
|
|
include ::Hpricot::Leaf::Trav
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# @yield [_self]
|
|
|
|
# @yieldparam _self [Hpricot::Text::Trav] the object that the method was called on
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#699
|
2021-09-10 21:21:17 +01:00
|
|
|
def traverse_text_internal; end
|
|
|
|
end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# :startdoc:
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/modules.rb#25
|
2021-09-10 21:21:17 +01:00
|
|
|
module Hpricot::Traverse
|
2023-12-14 15:34:15 +00:00
|
|
|
# Find the first matching node for the CSS or XPath
|
|
|
|
# +expr+ string.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#341
|
2021-09-10 21:21:17 +01:00
|
|
|
def %(expr); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Searches this node for all elements matching
|
|
|
|
# the CSS or XPath +expr+. Returns an Elements array
|
|
|
|
# containing the matching nodes. If +blk+ is given, it
|
|
|
|
# is used to iterate through the matching set.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#254
|
2021-09-10 21:21:17 +01:00
|
|
|
def /(expr, &blk); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Adds elements immediately after this element, contained in the +html+ string.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#121
|
2021-09-10 21:21:17 +01:00
|
|
|
def after(html = T.unsafe(nil), &blk); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Find the first matching node for the CSS or XPath
|
|
|
|
# +expr+ string.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#341
|
2021-09-10 21:21:17 +01:00
|
|
|
def at(expr); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Adds elements immediately before this element, contained in the +html+ string.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#126
|
2021-09-10 21:21:17 +01:00
|
|
|
def before(html = T.unsafe(nil), &blk); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Is this object a stranded end tag?
|
|
|
|
#
|
|
|
|
# @return [Boolean]
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#21
|
2021-09-10 21:21:17 +01:00
|
|
|
def bogusetag?; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Find children of a given +tag_name+.
|
|
|
|
#
|
|
|
|
# ele.children_of_type('p')
|
|
|
|
# #=> [...array of paragraphs...]
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#390
|
2021-09-10 21:21:17 +01:00
|
|
|
def children_of_type(tag_name); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#203
|
2021-09-10 21:21:17 +01:00
|
|
|
def clean_path(path); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Is this object a comment?
|
|
|
|
#
|
|
|
|
# @return [Boolean]
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#19
|
2021-09-10 21:21:17 +01:00
|
|
|
def comment?; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Builds a unique CSS string for this node, from the
|
|
|
|
# root of the document containing it.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#226
|
2021-09-10 21:21:17 +01:00
|
|
|
def css_path; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Is this object the enclosing HTML or XML document?
|
|
|
|
#
|
|
|
|
# @return [Boolean]
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#7
|
2021-09-10 21:21:17 +01:00
|
|
|
def doc?; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Is this object a doctype tag?
|
|
|
|
#
|
|
|
|
# @return [Boolean]
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#15
|
2021-09-10 21:21:17 +01:00
|
|
|
def doctype?; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Is this object an HTML or XML element?
|
|
|
|
#
|
|
|
|
# @return [Boolean]
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#9
|
2021-09-10 21:21:17 +01:00
|
|
|
def elem?; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Find all nodes which follow the current one.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#114
|
2021-09-10 21:21:17 +01:00
|
|
|
def following; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#138
|
2021-09-10 21:21:17 +01:00
|
|
|
def get_subnode(*indexes); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Builds an HTML string from the contents of this node.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#168
|
2021-09-10 21:21:17 +01:00
|
|
|
def html(inner = T.unsafe(nil), &blk); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#47
|
2021-09-10 21:21:17 +01:00
|
|
|
def index(name); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Builds an HTML string from the contents of this node.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#168
|
2021-09-10 21:21:17 +01:00
|
|
|
def innerHTML(inner = T.unsafe(nil), &blk); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Inserts new contents into the current node, based on
|
|
|
|
# the HTML contained in string +inner+.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#191
|
2021-09-10 21:21:17 +01:00
|
|
|
def innerHTML=(inner); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Builds a string from the text contained in this node. All
|
|
|
|
# HTML elements are removed.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#158
|
2021-09-10 21:21:17 +01:00
|
|
|
def innerText; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Builds an HTML string from the contents of this node.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#168
|
2021-09-10 21:21:17 +01:00
|
|
|
def inner_html(inner = T.unsafe(nil), &blk); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Inserts new contents into the current node, based on
|
|
|
|
# the HTML contained in string +inner+.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#191
|
2021-09-10 21:21:17 +01:00
|
|
|
def inner_html=(inner); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Builds a string from the text contained in this node. All
|
|
|
|
# HTML elements are removed.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#158
|
2021-09-10 21:21:17 +01:00
|
|
|
def inner_text; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Parses an HTML string, making an HTML fragment based on
|
|
|
|
# the options used to create the container document.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#25
|
2021-09-10 21:21:17 +01:00
|
|
|
def make(input = T.unsafe(nil), &blk); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Returns the node neighboring this node to the south: just below it.
|
|
|
|
# This method includes text nodes and comments and such.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#91
|
2021-09-10 21:21:17 +01:00
|
|
|
def next; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Returns the node neighboring this node to the south: just below it.
|
|
|
|
# This method includes text nodes and comments and such.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#91
|
2021-09-10 21:21:17 +01:00
|
|
|
def next_node; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#242
|
2021-09-10 21:21:17 +01:00
|
|
|
def node_position; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Puts together an array of neighboring nodes based on their proximity
|
|
|
|
# to this node. So, for example, to get the next node, you could use
|
|
|
|
# <tt>nodes_at(1). Or, to get the previous node, use <tt>nodes_at(1)</tt>.
|
|
|
|
#
|
|
|
|
# This method also accepts ranges and sets of numbers.
|
|
|
|
#
|
|
|
|
# ele.nodes_at(-3..-1, 1..3) # gets three nodes before and three after
|
|
|
|
# ele.nodes_at(1, 5, 7) # gets three nodes at offsets below the current node
|
|
|
|
# ele.nodes_at(0, 5..6) # the current node and two others
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#67
|
2021-09-10 21:21:17 +01:00
|
|
|
def nodes_at(*pos); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#246
|
2021-09-10 21:21:17 +01:00
|
|
|
def position; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Find all preceding nodes.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#107
|
2021-09-10 21:21:17 +01:00
|
|
|
def preceding; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Returns to node neighboring this node to the north: just above it.
|
|
|
|
# This method includes text nodes and comments and such.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#99
|
2021-09-10 21:21:17 +01:00
|
|
|
def previous; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Returns to node neighboring this node to the north: just above it.
|
|
|
|
# This method includes text nodes and comments and such.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#99
|
2021-09-10 21:21:17 +01:00
|
|
|
def previous_node; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Is this object an XML processing instruction?
|
|
|
|
#
|
|
|
|
# @return [Boolean]
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#17
|
2021-09-10 21:21:17 +01:00
|
|
|
def procins?; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Searches this node for all elements matching
|
|
|
|
# the CSS or XPath +expr+. Returns an Elements array
|
|
|
|
# containing the matching nodes. If +blk+ is given, it
|
|
|
|
# is used to iterate through the matching set.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#254
|
2021-09-10 21:21:17 +01:00
|
|
|
def search(expr, &blk); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Replace this element and its contents with the nodes contained
|
|
|
|
# in the +html+ string.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#133
|
2021-09-10 21:21:17 +01:00
|
|
|
def swap(html = T.unsafe(nil), &blk); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Is this object an HTML text node?
|
|
|
|
#
|
|
|
|
# @return [Boolean]
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#11
|
2021-09-10 21:21:17 +01:00
|
|
|
def text?; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Builds an HTML string from this node and its contents.
|
|
|
|
# If you need to write to a stream, try calling <tt>output(io)</tt>
|
|
|
|
# as a method on this object.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#36
|
2021-09-10 21:21:17 +01:00
|
|
|
def to_html; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Attempts to preserve the original HTML of the document, only
|
|
|
|
# outputing new tags for elements which have changed.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#43
|
2021-09-10 21:21:17 +01:00
|
|
|
def to_original_html; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Builds a string from the text contained in this node. All
|
|
|
|
# HTML elements are removed.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#148
|
2021-09-10 21:21:17 +01:00
|
|
|
def to_plain_text; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Builds an HTML string from this node and its contents.
|
|
|
|
# If you need to write to a stream, try calling <tt>output(io)</tt>
|
|
|
|
# as a method on this object.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#36
|
2021-09-10 21:21:17 +01:00
|
|
|
def to_s; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# +traverse_element+ traverses elements in the tree.
|
|
|
|
# It yields elements in depth first order.
|
|
|
|
#
|
|
|
|
# If _names_ are empty, it yields all elements.
|
|
|
|
# If non-empty _names_ are given, it should be list of universal names.
|
|
|
|
#
|
|
|
|
# A nested element is yielded in depth first order as follows.
|
|
|
|
#
|
|
|
|
# t = Hpricot('<a id=0><b><a id=1 /></b><c id=2 /></a>')
|
|
|
|
# t.traverse_element("a", "c") {|e| p e}
|
|
|
|
# # =>
|
|
|
|
# {elem <a id="0"> {elem <b> {emptyelem <a id="1">} </b>} {emptyelem <c id="2">} </a>}
|
|
|
|
# {emptyelem <a id="1">}
|
|
|
|
# {emptyelem <c id="2">}
|
|
|
|
#
|
|
|
|
# Universal names are specified as follows.
|
|
|
|
#
|
|
|
|
# t = Hpricot(<<'End')
|
|
|
|
# <html>
|
|
|
|
# <meta name="robots" content="index,nofollow">
|
|
|
|
# <meta name="author" content="Who am I?">
|
|
|
|
# </html>
|
|
|
|
# End
|
|
|
|
# t.traverse_element("{http://www.w3.org/1999/xhtml}meta") {|e| p e}
|
|
|
|
# # =>
|
|
|
|
# {emptyelem <{http://www.w3.org/1999/xhtml}meta name="robots" content="index,nofollow">}
|
|
|
|
# {emptyelem <{http://www.w3.org/1999/xhtml}meta name="author" content="Who am I?">}
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#374
|
2021-09-10 21:21:17 +01:00
|
|
|
def traverse_element(*names, &block); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# +traverse_text+ traverses texts in the tree
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#680
|
2021-09-10 21:21:17 +01:00
|
|
|
def traverse_text(&block); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Is this object an XML declaration?
|
|
|
|
#
|
|
|
|
# @return [Boolean]
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#13
|
2021-09-10 21:21:17 +01:00
|
|
|
def xmldecl?; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Builds a unique XPath string for this node, from the
|
|
|
|
# root of the document containing it.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#209
|
2021-09-10 21:21:17 +01:00
|
|
|
def xpath; end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# source://hpricot//lib/hpricot/traverse.rb#196
|
2021-09-10 21:21:17 +01:00
|
|
|
def reparent(nodes); end
|
|
|
|
|
|
|
|
class << self
|
2023-12-14 15:34:15 +00:00
|
|
|
# source://hpricot//lib/hpricot/elements.rb#375
|
2021-09-10 21:21:17 +01:00
|
|
|
def filter(tok, &blk); end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# All the tags and attributes from XHTML 1.0 Strict
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/tags.rb#17
|
2021-09-10 21:21:17 +01:00
|
|
|
class Hpricot::XHTMLStrict
|
|
|
|
class << self
|
2023-12-14 15:34:15 +00:00
|
|
|
# Returns the value of attribute doctype.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/tags.rb#19
|
2021-09-10 21:21:17 +01:00
|
|
|
def doctype; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Sets the attribute doctype
|
|
|
|
#
|
|
|
|
# @param value the value to set the attribute doctype to.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/tags.rb#19
|
2021-09-10 21:21:17 +01:00
|
|
|
def doctype=(_arg0); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Returns the value of attribute forms.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/tags.rb#19
|
2021-09-10 21:21:17 +01:00
|
|
|
def forms; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Sets the attribute forms
|
|
|
|
#
|
|
|
|
# @param value the value to set the attribute forms to.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/tags.rb#19
|
2021-09-10 21:21:17 +01:00
|
|
|
def forms=(_arg0); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Returns the value of attribute self_closing.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/tags.rb#19
|
2021-09-10 21:21:17 +01:00
|
|
|
def self_closing; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Sets the attribute self_closing
|
|
|
|
#
|
|
|
|
# @param value the value to set the attribute self_closing to.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/tags.rb#19
|
2021-09-10 21:21:17 +01:00
|
|
|
def self_closing=(_arg0); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Returns the value of attribute tags.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/tags.rb#19
|
2021-09-10 21:21:17 +01:00
|
|
|
def tags; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Sets the attribute tags
|
|
|
|
#
|
|
|
|
# @param value the value to set the attribute tags to.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/tags.rb#19
|
2021-09-10 21:21:17 +01:00
|
|
|
def tags=(_arg0); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Returns the value of attribute tagset.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/tags.rb#19
|
2021-09-10 21:21:17 +01:00
|
|
|
def tagset; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Sets the attribute tagset
|
|
|
|
#
|
|
|
|
# @param value the value to set the attribute tagset to.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/tags.rb#19
|
2021-09-10 21:21:17 +01:00
|
|
|
def tagset=(_arg0); end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# Additional tags found in XHTML 1.0 Transitional
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/tags.rb#108
|
2021-09-10 21:21:17 +01:00
|
|
|
class Hpricot::XHTMLTransitional
|
|
|
|
class << self
|
2023-12-14 15:34:15 +00:00
|
|
|
# Returns the value of attribute doctype.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/tags.rb#110
|
2021-09-10 21:21:17 +01:00
|
|
|
def doctype; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Sets the attribute doctype
|
|
|
|
#
|
|
|
|
# @param value the value to set the attribute doctype to.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/tags.rb#110
|
2021-09-10 21:21:17 +01:00
|
|
|
def doctype=(_arg0); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Returns the value of attribute forms.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/tags.rb#110
|
2021-09-10 21:21:17 +01:00
|
|
|
def forms; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Sets the attribute forms
|
|
|
|
#
|
|
|
|
# @param value the value to set the attribute forms to.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/tags.rb#110
|
2021-09-10 21:21:17 +01:00
|
|
|
def forms=(_arg0); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Returns the value of attribute self_closing.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/tags.rb#110
|
2021-09-10 21:21:17 +01:00
|
|
|
def self_closing; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Sets the attribute self_closing
|
|
|
|
#
|
|
|
|
# @param value the value to set the attribute self_closing to.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/tags.rb#110
|
2021-09-10 21:21:17 +01:00
|
|
|
def self_closing=(_arg0); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Returns the value of attribute tags.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/tags.rb#110
|
2021-09-10 21:21:17 +01:00
|
|
|
def tags; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Sets the attribute tags
|
|
|
|
#
|
|
|
|
# @param value the value to set the attribute tags to.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/tags.rb#110
|
2021-09-10 21:21:17 +01:00
|
|
|
def tags=(_arg0); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Returns the value of attribute tagset.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/tags.rb#110
|
2021-09-10 21:21:17 +01:00
|
|
|
def tagset; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# Sets the attribute tagset
|
|
|
|
#
|
|
|
|
# @param value the value to set the attribute tagset to.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/tags.rb#110
|
2021-09-10 21:21:17 +01:00
|
|
|
def tagset=(_arg0); end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# source://hpricot//lib/hpricot/tag.rb#166
|
2021-09-10 21:21:17 +01:00
|
|
|
class Hpricot::XMLDecl
|
|
|
|
include ::Hpricot
|
|
|
|
include ::Hpricot::Node
|
|
|
|
include ::Hpricot::Leaf
|
|
|
|
include ::Hpricot::Traverse
|
|
|
|
include ::Hpricot::Leaf::Trav
|
|
|
|
include ::Hpricot::XMLDecl::Trav
|
|
|
|
|
|
|
|
def clear_raw; end
|
|
|
|
def encoding; end
|
|
|
|
def encoding=(_arg0); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/tag.rb#168
|
2021-09-10 21:21:17 +01:00
|
|
|
def output(out, opts = T.unsafe(nil)); end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/tag.rb#167
|
2021-09-10 21:21:17 +01:00
|
|
|
def pathname; end
|
2023-12-14 15:34:15 +00:00
|
|
|
|
2021-09-10 21:21:17 +01:00
|
|
|
def raw_string; end
|
|
|
|
def standalone; end
|
|
|
|
def standalone=(_arg0); end
|
|
|
|
def version; end
|
|
|
|
def version=(_arg0); end
|
|
|
|
end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# source://hpricot//lib/hpricot/modules.rb#32
|
2021-09-10 21:21:17 +01:00
|
|
|
module Hpricot::XMLDecl::Trav
|
|
|
|
include ::Hpricot::Traverse
|
|
|
|
include ::Hpricot::Leaf::Trav
|
|
|
|
end
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# Since Ruby is very dynamic, methods added to the ancestors of
|
|
|
|
# BlankSlate <em>after BlankSlate is defined</em> will show up in the
|
|
|
|
# list of available BlankSlate methods. We handle this by defining a
|
|
|
|
# hook in the Object and Kernel classes that will hide any defined
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/blankslate.rb#37
|
|
|
|
module Kernel
|
|
|
|
class << self
|
|
|
|
# Detect method additions to Kernel and remove them in the
|
|
|
|
# BlankSlate class.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/blankslate.rb#43
|
|
|
|
def method_added(name); end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
# source://hpricot//lib/hpricot/blankslate.rb#51
|
2021-09-10 21:21:17 +01:00
|
|
|
class Object < ::BasicObject
|
|
|
|
include ::Kernel
|
|
|
|
include ::PP::ObjectMixin
|
|
|
|
|
|
|
|
private
|
|
|
|
|
2023-12-14 15:34:15 +00:00
|
|
|
# source://hpricot//lib/hpricot/parse.rb#3
|
2021-09-10 21:21:17 +01:00
|
|
|
def Hpricot(input = T.unsafe(nil), opts = T.unsafe(nil), &blk); end
|
|
|
|
|
|
|
|
class << self
|
2023-12-14 15:34:15 +00:00
|
|
|
# Detect method additions to Object and remove them in the
|
|
|
|
# BlankSlate class.
|
|
|
|
#
|
|
|
|
# source://hpricot//lib/hpricot/blankslate.rb#57
|
2021-09-10 21:21:17 +01:00
|
|
|
def method_added(name); end
|
|
|
|
end
|
|
|
|
end
|