Sha256: 861722284bf4353809f5c807820bb378012e4f8ce166ca072aac54c674656987

Contents?: true

Size: 291 Bytes

Versions: 5

Compression:

Stored size: 291 Bytes

Contents

module Waddup

  # Automatically registers subclasses in its registry
  module Registry

    # Retrieves a static registry
    def registry
      @registry ||= []
    end

    # Registers given target in static registry
    def inherited(target)
      registry << target
    end

  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
waddup-0.2.2 lib/waddup/registry.rb
waddup-0.2.1 lib/waddup/registry.rb
waddup-0.2.0 lib/waddup/registry.rb
waddup-0.1.0 lib/waddup/registry.rb
waddup-0.0.2 lib/waddup/registry.rb