Module: Registerable

Module | Registerable
In: | lib/more/facets/registerable.rb

# Registerable

### Methods

register registry registry_invalid?

### Public Instance methods

register(*names)

Register format names.

[Source]

    # File lib/more/facets/registerable.rb, line 13
      def register(*names)
        names.each do |name|
          registry[name.to_s] = self
        end
      end

registry()

Access registry.

[Source]

    # File lib/more/facets/registerable.rb, line 21
      def registry
        @@registry ||= {}
      end

registry_invalid?(*types)

[Source]

    # File lib/more/facets/registerable.rb, line 27
      def registry_invalid?(*types)
        bad = []
        types.each do |type|
          bad << type unless @@registry[type]
        end
        return bad.empty? ? false : bad
      end

[Validate]