Class: Username::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/username/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

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

#forbiddenObject

Returns the value of attribute forbidden.



15
16
17
# File 'lib/username/configuration.rb', line 15

def forbidden
  @forbidden
end

#global_uniquenessObject

Returns the value of attribute global_uniqueness.



19
20
21
# File 'lib/username/configuration.rb', line 19

def global_uniqueness
  @global_uniqueness
end

#maxlengthObject

Returns the value of attribute maxlength.



17
18
19
# File 'lib/username/configuration.rb', line 17

def maxlength
  @maxlength
end

#minlengthObject

Returns the value of attribute minlength.



16
17
18
# File 'lib/username/configuration.rb', line 16

def minlength
  @minlength
end

#modelsObject

Returns the value of attribute models.



14
15
16
# File 'lib/username/configuration.rb', line 14

def models
  @models
end

#regexObject

Returns the value of attribute regex.



18
19
20
# File 'lib/username/configuration.rb', line 18

def regex
  @regex
end