Class: Jekyll::Plugin

### Home Classes Methods

### In Files

- lib/jekyll/plugin.rb

### Parent

Object

### Methods

- ::<=>
- ::inherited
- ::new
- ::priority
- ::safe
- ::subclasses

### Files

- LICENSE

### Class/Module Index

Quicksearch

- Jekyll
- Jekyll::Command
- Jekyll::Commands
- Jekyll::Commands::Build
- Jekyll::Commands::Doctor
- Jekyll::Commands::New
- Jekyll::Commands::Serve
- Jekyll::Configuration
- Jekyll::Converter
- Jekyll::Converters
- Jekyll::Converters::Identity
- Jekyll::Converters::Markdown
- Jekyll::Converters::Markdown::KramdownParser
- Jekyll::Converters::Markdown::MarukuParser
- Jekyll::Converters::Markdown::RDiscountParser
- Jekyll::Converters::Markdown::RedcarpetParser
- Jekyll::Converters::Markdown::RedcarpetParser::CommonMethods
- Jekyll::Converters::Markdown::RedcarpetParser::WithPygments
- Jekyll::Converters::Markdown::RedcarpetParser::WithoutPygments
- Jekyll::Converters::Textile
- Jekyll::Convertible
- Jekyll::Deprecator
- Jekyll::Draft
- Jekyll::Excerpt
- Jekyll::FatalException
- Jekyll::Filters
- Jekyll::Generator
- Jekyll::Generators
- Jekyll::Generators::Pagination
- Jekyll::GistTag
- Jekyll::Layout
- Jekyll::Page
- Jekyll::Pager
- Jekyll::Plugin
- Jekyll::Post
- Jekyll::RelatedPosts
- Jekyll::Site
- Jekyll::Site::Cleaner
- Jekyll::StaticFile
- Jekyll::Stevenson
- Jekyll::Tags
- Jekyll::Tags::HighlightBlock
- Jekyll::Tags::IncludeTag
- Jekyll::Tags::PostComparer
- Jekyll::Tags::PostUrl
- Jekyll::URL
- Date
- Enumerable
- Hash
- Object

No matching classes.

# Jekyll::Plugin

### Constants

PRIORITIES

### Public Class Methods

<=>(other) click to toggle source

Spaceship is priority [higher -> lower]

other - The class to be compared.

Returns -1, 0, 1.

    # File lib/jekyll/plugin.rb, line 62
    def self.<=>(other)
      PRIORITIES[other.priority] <=> PRIORITIES[self.priority]
    end

inherited(base) click to toggle source

Install a hook so that subclasses are recorded. This method is only ever called by Ruby itself.

base - The Class subclass.

Returns nothing.

    # File lib/jekyll/plugin.rb, line 15
    def self.inherited(base)
      subclasses << base
      subclasses.sort!
    end

new(config = {}) click to toggle source

Initialize a new plugin. This should be overridden by the subclass.

config - The Hash of configuration options.

Returns a new instance.

    # File lib/jekyll/plugin.rb, line 71
    def initialize(config = {})
      # no-op for default
    end

priority(priority = nil) click to toggle source

Get or set the priority of this plugin. When called without an argument it returns the priority. When an argument is given, it will set the priority.

priority - The Symbol priority (default: nil). Valid options are:

    :lowest, :low, :normal, :high, :highest

Returns the Symbol priority.

    # File lib/jekyll/plugin.rb, line 35
    def self.priority(priority = nil)
      @priority ||= nil
      if priority && PRIORITIES.has_key?(priority)
        @priority = priority
      end
      @priority || :normal
    end

safe(safe = nil) click to toggle source

Get or set the safety of this plugin. When called without an argument it returns the safety. When an argument is given, it will set the safety.

safe - The Boolean safety (default: nil).

Returns the safety Boolean.

    # File lib/jekyll/plugin.rb, line 50
    def self.safe(safe = nil)
      if safe
        @safe = safe
      end
      @safe || false
    end

subclasses() click to toggle source

The list of Classes that have been subclassed.

Returns an Array of Class objects.

    # File lib/jekyll/plugin.rb, line 23
    def self.subclasses
      @subclasses ||= []
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.