Module: Thoth::Plugin

### Home Classes Methods

### In Files

- lib/thoth/plugin/thoth_delicious.rb
- lib/thoth/plugin/thoth_flickr.rb
- lib/thoth/plugin/thoth_tags.rb
- lib/thoth/plugin/thoth_twitter.rb
- lib/thoth/plugin.rb

### Namespace

- MODULE Thoth::Plugin::Delicious
- MODULE Thoth::Plugin::Flickr
- MODULE Thoth::Plugin::Tags
- MODULE Thoth::Plugin::Twitter

### Methods

- ::const_missing
- ::load

### Files

- robots.txt

### Class/Module Index

Quicksearch

- Thoth
- Thoth::AdminController
- Thoth::ArchiveController
- Thoth::Comment
- Thoth::CommentApiController
- Thoth::CommentController
- Thoth::Config
- Thoth::Error
- Thoth::Importer
- Thoth::MainController
- Thoth::Media
- Thoth::MediaController
- Thoth::MinifyController
- Thoth::Page
- Thoth::PageApiController
- Thoth::PageController
- Thoth::Pager
- Thoth::Plugin
- Thoth::Plugin::Delicious
- Thoth::Plugin::Flickr
- Thoth::Plugin::Tags
- Thoth::Plugin::Twitter
- Thoth::Post
- Thoth::PostApiController
- Thoth::PostController
- Thoth::SchemaError
- Thoth::SearchController
- Thoth::Tag
- Thoth::TagApiController
- Thoth::TagController
- Thoth::TagsPostsMap
- Ramaze
- Ramaze::Dispatcher
- Ramaze::Dispatcher::File
- Ramaze::Helper
- Ramaze::Helper::Admin
- Ramaze::Helper::Cookie
- Ramaze::Helper::Error
- Ramaze::Helper::Pagination
- Ramaze::Helper::Sanitize
- Ramaze::Helper::Wiki
- Ramaze::Helper::Ysearch
- Ramaze::Helper::Ysearch::SearchError
- AddMediaSize
- CreateSchema
- PantsImporter
- PoseidonImporter

No matching classes.

# Thoth::Plugin

Namespace for Thoth plugins. See code.google.com/p/thoth-blog/wiki/CreatingPlugins for more info on creating and using plugins.

### Public Class Methods

const_missing(name) click to toggle source

    # File lib/thoth/plugin.rb, line 35
    def self.const_missing(name)
      self.load(name)
      self.const_get(name)
    end

load(name) click to toggle source

Attempts to load the specified plugin, first from Thoth's `/plugin` directory, then as a gem.

    # File lib/thoth/plugin.rb, line 42
    def self.load(name)
      plugin = "thoth_#{name.to_s.downcase.gsub(/^thoth_/, '')}"
      files  = Dir["{#{HOME_DIR/:plugin},#{LIB_DIR/:plugin}," <<
          "#{$:.join(',')}}/#{plugin}.rb"]

      # First try to load a local copy of the plugin, then try the gem.
      unless (files.any? && require(files.first)) || require(plugin)
        raise LoadError, "Thoth::Plugin::#{name} not found"
      end

      Ramaze::Log.info "Loaded plugin: #{plugin}"

      true
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.