struct Arachnid::Document::HTML

Defined in:

arachnid/document/html.cr

Constructors

Class Method Summary

Instance Method Summary

Macro Summary

Constructor Detail

def self.new(content : String) #

[View source]

Class Method Detail

def self.css_query_to_xpath(query : String) : String #

Transform the css query into an xpath query


[View source]
def self.parse(content : String) #

[View source]

Instance Method Detail

def at_css(query : String) #

Find first node corresponding to the css query and return HTML::Tag if found or nil if not found


[View source]
def at_id(id_name : String) : Tag? #

Find a node by its id and return a HTML::Tag found or nil if not found


[View source]
def at_tag(tag_name : String) : Tag? #

Find first tag by tag name and return HTML::Tag if found or nil if not found


[View source]
def css(query : String, &block) : Array(Tag) #

Find all nodes corresponding to the css query and yield HTML::Tag found or nil if not found


[View source]
def where_class(class_name : String, &block) : Array(Tag) #

Find all nodes by classname and yield HTML::Tag founded


[View source]
def where_tag(tag_name : String, &block) : Array(Tag) #

Find all nodes by tag name and yield HTML::Tag if found


[View source]

Macro Detail

macro method_missing(call) #

[View source]