Sha256: 1bbfeee9819670325d9340887a9b3427118a83cfcdcfe419890db1656185cd0b

Contents?: true

Size: 404 Bytes

Versions: 3

Compression:

Stored size: 404 Bytes

Contents

module CanTango
  class Configuration
    class Users < Registry::Clazz
      include Singleton
      
      def register_user clazz
        register user_name(clazz), clazz
      end
      alias_method :register_class, :register_user
              
      protected
      
      def user_name clazz
        clazz.name.demodulize.gsub(/(.+)User$/, '\1').to_s.underscore
      end      
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
cantango-config-0.1.9.2 lib/cantango/configuration/users.rb
cantango-config-0.1.8.1 lib/cantango/configuration/users.rb
cantango-config-0.1.8 lib/cantango/configuration/users.rb