Sha256: 80ca59ba89f7e486820d97dfa2e275ece52b5be4fdaadc520a66d28d56a2e6db

Contents?: true

Size: 569 Bytes

Versions: 2

Compression:

Stored size: 569 Bytes

Contents

# Implements a very basic registry for Woodhouse extensions. This is a Class
# rather than a Module because it will eventually be used to provide a more
# structured approach than the one Woodhouse::Progress uses.
class Woodhouse::Extension
  
  class << self

    attr_accessor :registry

    def register(name, extension)
      registry[name] = extension
    end

    def install_extension(name, configuration, opts = {}, &blk)
      if ext = registry[name]
        ext.install_extension(configuration, opts, &blk)
      end
    end

  end

  self.registry = {}

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
woodhouse-0.1.2 lib/woodhouse/extension.rb
woodhouse-0.1.1 lib/woodhouse/extension.rb