# typed: true
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `hpricot` gem.
# Please instead update this file by running `bin/tapioca gem hpricot`.
# source://hpricot//lib/hpricot/tag.rb#1
module Hpricot
class << self
# Hpricot::XML parses input, disregarding all the HTML rules
# and returning a document tree.
#
# source://hpricot//lib/hpricot/parse.rb#20
def XML(input = T.unsafe(nil), opts = T.unsafe(nil), &blk); end
def buffer_size; end
def buffer_size=(_arg0); end
# source://hpricot//lib/hpricot/builder.rb#15
def build(ele = T.unsafe(nil), assigns = T.unsafe(nil), &blk); end
def css(_arg0, _arg1, _arg2); end
# :stopdoc:
#
# source://hpricot//lib/hpricot/parse.rb#27
def make(input = T.unsafe(nil), opts = T.unsafe(nil), &blk); end
# Hpricot.parse parses input and return a document tree.
# represented by Hpricot::Doc.
#
# source://hpricot//lib/hpricot/parse.rb#14
def parse(input = T.unsafe(nil), opts = T.unsafe(nil), &blk); end
def scan(*_arg0); end
# XML unescape
#
# source://hpricot//lib/hpricot/builder.rb#8
def uxs(str); end
end
end
# Common sets of attributes.
#
# source://hpricot//lib/hpricot/tags.rb#7
Hpricot::AttrCore = T.let(T.unsafe(nil), Array)
# source://hpricot//lib/hpricot/tags.rb#9
Hpricot::AttrEvents = T.let(T.unsafe(nil), Array)
# source://hpricot//lib/hpricot/tags.rb#11
Hpricot::AttrFocus = T.let(T.unsafe(nil), Array)
# source://hpricot//lib/hpricot/tags.rb#12
Hpricot::AttrHAlign = T.let(T.unsafe(nil), Array)
# source://hpricot//lib/hpricot/tags.rb#8
Hpricot::AttrI18n = T.let(T.unsafe(nil), Array)
# source://hpricot//lib/hpricot/tags.rb#13
Hpricot::AttrVAlign = T.let(T.unsafe(nil), Array)
# source://hpricot//lib/hpricot/tag.rb#41
class Hpricot::Attributes
# @return [Attributes] a new instance of Attributes
#
# source://hpricot//lib/hpricot/tag.rb#43
def initialize(e); end
# source://hpricot//lib/hpricot/tag.rb#46
def [](k); end
# source://hpricot//lib/hpricot/tag.rb#49
def []=(k, v); end
# Returns the value of attribute element.
#
# source://hpricot//lib/hpricot/tag.rb#42
def element; end
# Sets the attribute element
#
# @param value the value to set the attribute element to.
#
# source://hpricot//lib/hpricot/tag.rb#42
def element=(_arg0); end
# source://hpricot//lib/hpricot/tag.rb#65
def inspect; end
# source://hpricot//lib/hpricot/tag.rb#52
def to_hash; end
# source://hpricot//lib/hpricot/tag.rb#62
def to_s; end
end
# source://hpricot//lib/hpricot/tags.rb#14
Hpricot::Attrs = T.let(T.unsafe(nil), Array)
# BlankSlate provides an abstract base class with no predefined
# methods (except for \_\_send__ and \_\_id__).
# BlankSlate is useful as a base class when writing classes that
# depend upon method_missing (e.g. dynamic proxies).
#
# source://hpricot//lib/hpricot/blankslate.rb#17
class Hpricot::BlankSlate
class << self
# 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
def hide(name); end
end
end
# source://hpricot//lib/hpricot/tag.rb#124
class Hpricot::BogusETag
include ::Hpricot
include ::Hpricot::Node
include ::Hpricot::Leaf
include ::Hpricot::Traverse
include ::Hpricot::Leaf::Trav
include ::Hpricot::BogusETag::Trav
# @return [BogusETag] a new instance of BogusETag
#
# source://hpricot//lib/hpricot/tag.rb#125
def initialize(name); end
def clear_raw; end
# source://hpricot//lib/hpricot/tag.rb#126
def output(out, opts = T.unsafe(nil)); end
# source://hpricot//lib/hpricot/inspect.rb#90
def pretty_print(q); end
def raw_string; end
end
# source://hpricot//lib/hpricot/modules.rb#36
module Hpricot::BogusETag::Trav
include ::Hpricot::Traverse
include ::Hpricot::Leaf::Trav
end
# source://hpricot//lib/hpricot/builder.rb#24
module Hpricot::Builder
# Write a +string+ to the HTML stream without escaping it.
#
# source://hpricot//lib/hpricot/builder.rb#55
def <<(string); end
def a(*args, &block); end
def abbr(*args, &block); end
def acronym(*args, &block); end
# source://hpricot//lib/hpricot/builder.rb#42
def add_child(ele); end
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
# source://hpricot//lib/hpricot/builder.rb#121
def build(*a, &b); end
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
# Write a +string+ to the HTML stream without escaping it.
#
# source://hpricot//lib/hpricot/builder.rb#55
def concat(string); end
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
# source://hpricot//lib/hpricot/builder.rb#149
def doctype(target, pub, sys); end
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
# Builds a head tag. Adds a meta tag inside with Content-Type
# set to text/html; charset=utf-8.
#
# source://hpricot//lib/hpricot/builder.rb#157
def head(*args, &block); end
def hr(*args, &block); end
def html(*args, &block); end
# Every HTML tag method goes through an html_tag call. So, calling div is equivalent
# to calling html_tag(:div). 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
def html_tag(sym, *args, &block); end
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
# 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
def tag!(tag, *args, &block); end
def tbody(*args, &block); end
def td(*args, &block); end
# Write a +string+ to the HTML stream without escaping it.
#
# source://hpricot//lib/hpricot/builder.rb#55
def text(string); end
# Write a +string+ to the HTML stream, making sure to escape it.
#
# source://hpricot//lib/hpricot/builder.rb#50
def text!(string); end
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
# Builds an html tag with XHTML 1.0 Strict doctype instead.
#
# source://hpricot//lib/hpricot/builder.rb#173
def xhtml_strict(attrs = T.unsafe(nil), &block); end
# Builds an html tag. An XML 1.0 instruction and an XHTML 1.0 Transitional doctype
# are prepended. Also assumes :xmlns => "http://www.w3.org/1999/xhtml",
# :lang => "en".
#
# source://hpricot//lib/hpricot/builder.rb#167
def xhtml_transitional(attrs = T.unsafe(nil), &block); end
private
# source://hpricot//lib/hpricot/builder.rb#180
def xhtml_html(attrs = T.unsafe(nil), &block); end
class << self
# source://hpricot//lib/hpricot/builder.rb#38
def set(option, value); end
end
end
# source://hpricot//lib/hpricot/tag.rb#152
class Hpricot::CData
include ::Hpricot
include ::Hpricot::Node
include ::Hpricot::Leaf
include ::Hpricot::Traverse
include ::Hpricot::Leaf::Trav
include ::Hpricot::CData::Trav
# @return [CData] a new instance of CData
#
# source://hpricot//lib/hpricot/tag.rb#153
def initialize(content); end
def content; end
def content=(_arg0); end
def inner_text; end
# source://hpricot//lib/hpricot/tag.rb#158
def output(out, opts = T.unsafe(nil)); end
# source://hpricot//lib/hpricot/tag.rb#157
def raw_string; end
def to_plain_text; end
def to_s; end
end
# source://hpricot//lib/hpricot/modules.rb#30
module Hpricot::CData::Trav
include ::Hpricot::Traverse
include ::Hpricot::Leaf::Trav
end
# source://hpricot//lib/hpricot/tag.rb#207
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
# source://hpricot//lib/hpricot/tag.rb#210
def output(out, opts = T.unsafe(nil)); end
# source://hpricot//lib/hpricot/tag.rb#208
def pathname; end
# source://hpricot//lib/hpricot/tag.rb#209
def raw_string; end
end
# source://hpricot//lib/hpricot/modules.rb#35
module Hpricot::Comment::Trav
include ::Hpricot::Traverse
include ::Hpricot::Leaf::Trav
end
# source://hpricot//lib/hpricot/modules.rb#12
module Hpricot::Container
include ::Hpricot
include ::Hpricot::Node
end
# :startdoc:
#
# source://hpricot//lib/hpricot/modules.rb#26
module Hpricot::Container::Trav
include ::Hpricot::Traverse
# Returns a list of CSS classes to which this element belongs.
#
# source://hpricot//lib/hpricot/traverse.rb#518
def classes; end
# 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
def containers; end
# +each_child+ iterates over each child.
#
# source://hpricot//lib/hpricot/traverse.rb#498
def each_child(&block); end
# +each_child_with_index+ iterates over each child.
#
# source://hpricot//lib/hpricot/traverse.rb#504
def each_child_with_index(&block); end
# +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
def each_hyperlink; end
# +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
def each_hyperlink_uri(base_uri = T.unsafe(nil)); end
# +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
def each_uri(base_uri = T.unsafe(nil)); end
# +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
def filter(&block); end
# +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
def find_element(*names); end
# 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
def following_siblings; end
# source://hpricot//lib/hpricot/traverse.rb#522
def get_element_by_id(id); end
# source://hpricot//lib/hpricot/traverse.rb#531
def get_elements_by_tag_name(*a); end
# 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
def insert_after(nodes, ele); end
# 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
def insert_before(nodes, ele); end
# 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
def next_sibling; end
# Find all preceding sibling elements. Like the other "sibling" methods, this weeds
# out text and comment nodes.
#
# source://hpricot//lib/hpricot/traverse.rb#427
def preceding_siblings; end
# 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
def previous_sibling; end
# Replace +old+, a child of the current node, with +new+ node.
#
# source://hpricot//lib/hpricot/traverse.rb#467
def replace_child(old, new); end
# 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
def siblings_at(*pos); end
# source://hpricot//lib/hpricot/traverse.rb#688
def traverse_text_internal(&block); end
private
# source://hpricot//lib/hpricot/traverse.rb#540
def each_hyperlink_attribute; end
end
# source://hpricot//lib/hpricot/modules.rb#3
class Hpricot::Context
include ::Hpricot
end
# 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
class Hpricot::CssProxy < ::Hpricot::BlankSlate
# Creates a CssProxy object.
#
# @return [CssProxy] a new instance of CssProxy
#
# source://hpricot//lib/hpricot/builder.rb#195
def initialize(builder, sym); end
# 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
def method_missing(id_or_class, *args, &block); end
end
# :stopdoc:
#
# source://hpricot//lib/hpricot/tag.rb#4
class Hpricot::Doc
include ::Hpricot
include ::Hpricot::Node
include ::Hpricot::Container
include ::Hpricot::Traverse
include ::Hpricot::Container::Trav
include ::Hpricot::Doc::Trav
# source://hpricot//lib/hpricot/tag.rb#14
def altered!; end
# source://pp/0.3.0/pp.rb#356
def inspect; end
# source://hpricot//lib/hpricot/tag.rb#15
def inspect_tree; end
# source://hpricot//lib/hpricot/tag.rb#11
def make(input = T.unsafe(nil), &blk); end
# source://hpricot//lib/hpricot/tag.rb#5
def output(out, opts = T.unsafe(nil)); end
# source://hpricot//lib/hpricot/inspect.rb#13
def pretty_print(q); end
end
# :stopdoc:
#
# source://hpricot//lib/hpricot/modules.rb#28
module Hpricot::Doc::Trav
include ::Hpricot::Traverse
include ::Hpricot::Container::Trav
# +author+ searches author and return it as a text.
# It returns nil if not found.
#
# +author+ searchs following information.
#
# - in HTML
# - in HTML
# - author-name in RSS
# - author-name in RSS
#
# source://hpricot//lib/hpricot/traverse.rb#761
def author; end
# source://hpricot//lib/hpricot/traverse.rb#641
def css_path; end
# @raise [Hpricot::Error]
#
# source://hpricot//lib/hpricot/traverse.rb#805
def root; end
# +title+ searches title and return it as a text.
# It returns nil if not found.
#
# +title+ searchs following information.
#
# -
... in HTML
# - ... in RSS
#
# source://hpricot//lib/hpricot/traverse.rb#744
def title; end
# source://hpricot//lib/hpricot/traverse.rb#635
def traverse_all_element(&block); end
# source://hpricot//lib/hpricot/traverse.rb#660
def traverse_some_element(name_set, &block); end
# source://hpricot//lib/hpricot/traverse.rb#638
def xpath; end
end
# source://hpricot//lib/hpricot/tag.rb#179
class Hpricot::DocType
include ::Hpricot
include ::Hpricot::Node
include ::Hpricot::Leaf
include ::Hpricot::Traverse
include ::Hpricot::Leaf::Trav
include ::Hpricot::DocType::Trav
# @return [DocType] a new instance of DocType
#
# source://hpricot//lib/hpricot/tag.rb#180
def initialize(target, pub, sys); end
def clear_raw; end
# source://hpricot//lib/hpricot/tag.rb#184
def output(out, opts = T.unsafe(nil)); end
# source://hpricot//lib/hpricot/tag.rb#183
def pathname; end
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
# source://hpricot//lib/hpricot/modules.rb#33
module Hpricot::DocType::Trav
include ::Hpricot::Traverse
include ::Hpricot::Leaf::Trav
end
# source://hpricot//lib/hpricot/tag.rb#131
class Hpricot::ETag < ::Hpricot::BogusETag
include ::Hpricot::Tag
# source://pp/0.3.0/pp.rb#356
def inspect; end
# source://hpricot//lib/hpricot/tag.rb#132
def output(out, opts = T.unsafe(nil)); end
# source://hpricot//lib/hpricot/inspect.rb#75
def pretty_print(q); end
end
# source://hpricot//lib/hpricot/tag.rb#70
class Hpricot::Elem
include ::Hpricot
include ::Hpricot::Node
include ::Hpricot::Container
include ::Hpricot::Traverse
include ::Hpricot::Container::Trav
include ::Hpricot::Elem::Trav
# @return [Elem] a new instance of Elem
#
# source://hpricot//lib/hpricot/tag.rb#71
def initialize(tag, attrs = T.unsafe(nil), children = T.unsafe(nil), etag = T.unsafe(nil)); end
# source://hpricot//lib/hpricot/tag.rb#76
def attributes; end
# source://hpricot//lib/hpricot/tag.rb#110
def attributes_as_html; end
def clear_raw; end
# @return [Boolean]
#
# source://hpricot//lib/hpricot/tag.rb#75
def empty?; end
# source://pp/0.3.0/pp.rb#356
def inspect; end
# source://hpricot//lib/hpricot/tag.rb#118
def inspect_tree(depth = T.unsafe(nil)); end
# source://hpricot//lib/hpricot/tag.rb#93
def output(out, opts = T.unsafe(nil)); end
# source://hpricot//lib/hpricot/tag.rb#92
def pathname; end
# source://hpricot//lib/hpricot/inspect.rb#38
def pretty_print(q); end
# source://hpricot//lib/hpricot/inspect.rb#55
def pretty_print_stag(q); end
# source://hpricot//lib/hpricot/tag.rb#79
def to_plain_text; end
end
# source://hpricot//lib/hpricot/modules.rb#29
module Hpricot::Elem::Trav
include ::Hpricot::Traverse
include ::Hpricot::Container::Trav
# source://hpricot//lib/hpricot/traverse.rb#818
def [](name); end
# source://hpricot//lib/hpricot/traverse.rb#824
def []=(name, val); end
# source://hpricot//lib/hpricot/traverse.rb#818
def get_attribute(name); end
# @return [Boolean]
#
# source://hpricot//lib/hpricot/traverse.rb#815
def has_attribute?(name); end
# source://hpricot//lib/hpricot/traverse.rb#830
def remove_attribute(name); end
# source://hpricot//lib/hpricot/traverse.rb#824
def set_attribute(name, val); end
# @yield [_self]
# @yieldparam _self [Hpricot::Elem::Trav] the object that the method was called on
#
# source://hpricot//lib/hpricot/traverse.rb#647
def traverse_all_element(&block); end
# @yield [_self]
# @yieldparam _self [Hpricot::Elem::Trav] the object that the method was called on
#
# source://hpricot//lib/hpricot/traverse.rb#666
def traverse_some_element(name_set, &block); end
end
# source://hpricot//lib/hpricot/htmlinfo.rb#59
Hpricot::ElementContent = T.let(T.unsafe(nil), Hash)
# source://hpricot//lib/hpricot/htmlinfo.rb#494
Hpricot::ElementExclusions = T.let(T.unsafe(nil), Hash)
# source://hpricot//lib/hpricot/htmlinfo.rb#486
Hpricot::ElementInclusions = T.let(T.unsafe(nil), Hash)
# :stopdoc:
#
# source://hpricot//lib/hpricot/elements.rb#52
class Hpricot::Elements < ::Array
# 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
def %(expr, &blk); end
# 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
def /(*expr, &blk); end
# 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
def add_class(class_name); end
# 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
def after(str = T.unsafe(nil), &blk); end
# 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
def append(str = T.unsafe(nil), &blk); end
# 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
def at(expr, &blk); end
# 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 #top anchor to each link.
#
# source://hpricot//lib/hpricot/elements.rb#205
def attr(key, value = T.unsafe(nil), &blk); end
# 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
def before(str = T.unsafe(nil), &blk); end
# Empty the elements in this list, by removing their insides.
#
# doc = Hpricot("
We have so much to say.
")
# doc.search("i").empty
# doc.to_html
# => "
We have to say.
"
#
# source://hpricot//lib/hpricot/elements.rb#130
def empty; end
# source://hpricot//lib/hpricot/elements.rb#351
def filter(expr); end
# 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
def html(*string); end
# 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
def html=(string); end
# 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
def innerHTML(*string); end
# 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
def innerHTML=(string); end
# 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
def inner_html(*string); end
# 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
def inner_html=(string); end
# 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
def inner_text; end
# source://pp/0.3.0/pp.rb#356
def inspect; end
# source://hpricot//lib/hpricot/elements.rb#356
def not(expr); end
# 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
def prepend(str = T.unsafe(nil), &blk); end
# source://hpricot//lib/hpricot/inspect.rb#6
def pretty_print(q); end
# Remove all elements in this list from the document which contains them.
#
# doc = Hpricot("Remove this: here")
# doc.search("b").remove
# doc.to_html
# => "Remove this: "
#
# source://hpricot//lib/hpricot/elements.rb#119
def remove; end
# Remove an attribute from each of the matched elements.
#
# (doc/"input").remove_attr("disabled")
#
# source://hpricot//lib/hpricot/elements.rb#239
def remove_attr(name); end
# 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
def remove_class(name = T.unsafe(nil)); end
# 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
def search(*expr, &blk); end
# 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 #top anchor to each link.
#
# source://hpricot//lib/hpricot/elements.rb#205
def set(key, value = T.unsafe(nil), &blk); end
# 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
def text; end
# Convert this group of elements into a complete HTML fragment, returned as a
# string.
#
# source://hpricot//lib/hpricot/elements.rb#78
def to_html; end
# Convert this group of elements into a complete HTML fragment, returned as a
# string.
#
# source://hpricot//lib/hpricot/elements.rb#78
def to_s; end
# 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(%{