Class: Nokogiri::HTML::Document

### Home Classes Methods

### In Files

- lib/webrobots/nokogiri.rb

### Parent

Object

### Methods

- #meta_robots
- #nofollow?
- #noindex?

### Files

- LICENSE.txt
- README.rdoc

### Class/Module Index

Quicksearch

- WebRobots
- WebRobots::Error
- WebRobots::ParseError
- WebRobots::RobotsTxt
- WebRobots::RobotsTxt::AccessControlLine
- WebRobots::RobotsTxt::AgentLine
- WebRobots::RobotsTxt::AllowLine
- WebRobots::RobotsTxt::CrawlDelayLine
- WebRobots::RobotsTxt::DisallowLine
- WebRobots::RobotsTxt::ExtentionLine
- WebRobots::RobotsTxt::Line
- WebRobots::RobotsTxt::Parser
- WebRobots::RobotsTxt::Record
- Nokogiri
- Nokogiri::HTML
- Nokogiri::HTML::Document
- Webrobots

No matching classes.

# Nokogiri::HTML::Document

### Public Instance Methods

meta_robots(custom_name = nil) click to toggle source

Returns an array of lower-cased <meta name="ROBOTS"> tokens. If no tag is found, returns an empty array. An optional `custom_name` specifies the name of a meta tag to look for ahead of "ROBOTS". Names are compared in a case-insensitive manner.

    # File lib/webrobots/nokogiri.rb, line 8
    def meta_robots(custom_name = nil)
      (@meta_robots ||= {})[custom_name] =
        (custom_name && parse_meta_robots(custom_name)) || parse_meta_robots('robots')
    end

nofollow?(custom_name = nil) click to toggle source

Equivalent to meta_robots(custom_name).include?('nofollow').

    # File lib/webrobots/nokogiri.rb, line 19
    def nofollow?(custom_name = nil)
      meta_robots(custom_name).include?('nofollow')
    end

noindex?(custom_name = nil) click to toggle source

Equivalent to meta_robots(custom_name).include?('noindex').

    # File lib/webrobots/nokogiri.rb, line 14
    def noindex?(custom_name = nil)
      meta_robots(custom_name).include?('noindex')
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.