class Cristagiri::HTML
- Cristagiri::HTML
- Reference
- Object
Overview
Represent an Html document who can be parsed
Defined in:
cristagiri/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
Instance Method Summary
-
#at_id(id_name : String)
Find a node by its id and return a XML::Node founded or a nil if not founded
-
#class(classname : String, &)
Find all nodes by classname and yield XML::Node founded
- #content : String
-
#tag(tag : String, &)
Find all nodes by tag name and yield XML::Node founded
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
Instance Method Detail
def at_id(id_name : String)
#
Find a node by its id and return a XML::Node founded or a nil if not founded