class Crystagiri::HTML
- Crystagiri::HTML
- Reference
- Object
Overview
Represent an Html document who can be parsed
Defined in:
crystagiri/html.crConstructors
-
.from_file(path : String) : HTML
Initialize an Html object from content of file designed by the given filepath
-
.from_url(url : String) : HTML
Initialize an Html object from Html source fetched from the url
-
.new(content : String)
Initialize an Html object from Html source
Class Method Summary
-
.css_query_to_xpath(query : String) : String
Transform the css query into an xpath query
Instance Method Summary
-
#at_css(query : String)
Find first node corresponding to the css query and return
Crystagiri::Tagif founded or a nil if not founded -
#at_id(id_name : String)
Find a node by its id and return a
Crystagiri::Tagfounded or a nil if not founded -
#at_tag(tag_name : String) : Crystagiri::Tag | Nil
Find first tag by tag name and return
Crystagiri::Tagfounded or a nil if not founded - #content : String
-
#css(query : String, &)
Find all node corresponding to the css query and yield
Crystagiri::Tagfounded or a nil if not founded -
#where_class(class_name : String, &)
Find all nodes by classname and yield
Crystagiri::Tagfounded -
#where_tag(tag_name : String, &)
Find all nodes by tag name and yield
Crystagiri::Tagfounded
Constructor Detail
Initialize an Html object from content of file designed by the given filepath
Initialize an Html object from Html source fetched from the url
Class Method Detail
Instance Method Detail
Find first node corresponding to the css query and return
Crystagiri::Tag if founded or a nil if not founded
Find a node by its id and return a
Crystagiri::Tag founded or a nil if not founded
Find first tag by tag name and return
Crystagiri::Tag founded or a nil if not founded
Find all node corresponding to the css query and yield
Crystagiri::Tag founded or a nil if not founded
Find all nodes by classname and yield
Crystagiri::Tag founded