Sha256: 6ae9e4d2629aeae05f8bd038bed2d600793cb30b3eb9b61957f3509968e3d959

Contents?: true

Size: 496 Bytes

Versions: 16

Compression:

Stored size: 496 Bytes

Contents

# TODO: Figure out a more robust Plugin system
# - Needs to handle subclass of subclass.....
# - Needs to have better mixin hiearchy

module Xcake
  module Plugin
    module ClassMethods
      def repository
        @repository ||= []
      end

      def inherited(klass)
        repository << klass
      end

      def register_plugin(klass)
        repository << klass
      end
    end

    def self.included(klass)
      klass.extend ClassMethods # Somewhat controversial
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
xcake-0.6.19 lib/xcake/plugin.rb
xcake-0.6.18 lib/xcake/plugin.rb
xcake-0.6.17 lib/xcake/plugin.rb
xcake-0.6.16 lib/xcake/plugin.rb
xcake-0.6.14 lib/xcake/plugin.rb
xcake-0.6.13 lib/xcake/plugin.rb
xcake-0.6.12 lib/xcake/plugin.rb
xcake-0.6.11 lib/xcake/plugin.rb
xcake-0.6.10 lib/xcake/plugin.rb
xcake-0.6.9 lib/xcake/plugin.rb
xcake-0.6.8 lib/xcake/plugin.rb
xcake-0.6.7 lib/xcake/plugin.rb
xcake-0.6.6 lib/xcake/plugin.rb
xcake-0.6.5 lib/xcake/plugin.rb
xcake-0.6.4 lib/xcake/plugin.rb
xcake-0.6.2 lib/xcake/plugin.rb