Class: RedTokenAuth::Configuration

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



7
8
9
10
11
12
13
# File 'lib/red_token_auth/configuration.rb', line 7

def initialize
  # Basically, just make sure there only one "@" in the email.
  @email_regex = /\A[^@\s]+@[^@\s]+\z/
  # Make sure there is at least one character and one number.
  @password_regex = /\A(?=.*?[a-z])(?=.*?[0-9]).{0,}\z/
  @password_length = 8..20
end

Instance Attribute Details

#email_regexObject

Returns the value of attribute email_regex.



3
4
5
# File 'lib/red_token_auth/configuration.rb', line 3

def email_regex
  @email_regex
end

#password_lengthObject

Returns the value of attribute password_length.



5
6
7
# File 'lib/red_token_auth/configuration.rb', line 5

def password_length
  @password_length
end

#password_regexObject

Returns the value of attribute password_regex.



4
5
6
# File 'lib/red_token_auth/configuration.rb', line 4

def password_regex
  @password_regex
end