Class: Mill::Resource::Robots

Inherits:
Mill::Resource show all
Defined in:
lib/mill/resources/robots.rb

Instance Attribute Summary

Attributes inherited from Mill::Resource

#content, #date, #input_file, #mill, #output_file, #public

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Mill::Resource

#absolute_uri, #build, #change_frequency, #final_content, #initialize, #tag_uri, #uri, #validate, #validate_xml

Constructor Details

This class inherits a constructor from Mill::Resource

Class Method Details

.typeObject



9
10
11
# File 'lib/mill/resources/robots.rb', line 9

def self.type
  :robots
end

Instance Method Details

#loadObject



13
14
15
16
17
18
19
# File 'lib/mill/resources/robots.rb', line 13

def load
  info = {
    'Sitemap' => @mill.sitemap_resource.absolute_uri,
  }
  @content = info.map { |key, value| "#{key}: #{value}" }.join("\n")
  super
end