Module: Laze::Plugins::Robots

Defined in:
lib/laze/plugins/robots.rb

Overview

This plugin creates a very simple robots.txt file with a reference to the sitemap. – TODO: check to make sure there is not already a robots.txt TODO: auto-build the file based on properties in the pages.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.applies_to?(kind) ⇒ Boolean

This plugin is a decorator for Target and fires before Target#save.

Returns:

  • (Boolean)


10
11
12
# File 'lib/laze/plugins/robots.rb', line 10

def self.applies_to?(kind) #:nodoc:
  kind == :target
end

Instance Method Details

#saveObject



14
15
16
17
# File 'lib/laze/plugins/robots.rb', line 14

def save
  create_robots_txt
  super
end