Sha256: acfd4a3865d2afd4c72d7756d0a88fb7437b0a64711e06ee282ffe44d1ac3219

Contents?: true

Size: 401 Bytes

Versions: 1

Compression:

Stored size: 401 Bytes

Contents

module Fathom
  module Plugins
    def plugins
      @plugins ||= []
    end

    def plugin(mod)
      include mod unless mod.const_defined?(:InstanceMethods)
      extend mod::ClassMethods if mod.const_defined?(:ClassMethods)
      include mod::InstanceMethods if mod.const_defined?(:InstanceMethods)
      mod.configure(self) if mod.respond_to?(:configure)
      plugins << mod
    end
  end
  
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fathom-0.5.0 lib/fathom/behaviors/plugins.rb