Class: Username::Configuration
- Inherits:
-
Object
- Object
- Username::Configuration
- Defined in:
- lib/username/configuration.rb
Instance Attribute Summary collapse
-
#forbidden ⇒ Object
Returns the value of attribute forbidden.
-
#global_uniqueness ⇒ Object
Returns the value of attribute global_uniqueness.
-
#maxlength ⇒ Object
Returns the value of attribute maxlength.
-
#minlength ⇒ Object
Returns the value of attribute minlength.
-
#models ⇒ Object
Returns the value of attribute models.
-
#regex ⇒ Object
Returns the value of attribute regex.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
21 22 23 24 25 26 27 28 |
# File 'lib/username/configuration.rb', line 21 def initialize @models = [] @forbidden = [] @minlength = 1 @maxlength = 20 @regex = /\A[a-zA-Z0-9_\.]*\z/ @global_uniqueness = true end |
Instance Attribute Details
#forbidden ⇒ Object
Returns the value of attribute forbidden.
15 16 17 |
# File 'lib/username/configuration.rb', line 15 def forbidden @forbidden end |
#global_uniqueness ⇒ Object
Returns the value of attribute global_uniqueness.
19 20 21 |
# File 'lib/username/configuration.rb', line 19 def global_uniqueness @global_uniqueness end |
#maxlength ⇒ Object
Returns the value of attribute maxlength.
17 18 19 |
# File 'lib/username/configuration.rb', line 17 def maxlength @maxlength end |
#minlength ⇒ Object
Returns the value of attribute minlength.
16 17 18 |
# File 'lib/username/configuration.rb', line 16 def minlength @minlength end |
#models ⇒ Object
Returns the value of attribute models.
14 15 16 |
# File 'lib/username/configuration.rb', line 14 def models @models end |
#regex ⇒ Object
Returns the value of attribute regex.
18 19 20 |
# File 'lib/username/configuration.rb', line 18 def regex @regex end |