Methods
register
registry
registry_invalid?
Public Instance methods
Register format names.
[ + ]
# File lib/more/facets/registerable.rb, line 13 def register(*names) names.each do |name| registry[name.to_s] = self end end
Access registry.
[ + ]
# File lib/more/facets/registerable.rb, line 21 def registry @@registry ||= {} end
[ + ]
# 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