Class: RedTokenAuth::Configuration
- Inherits:
-
Object
- Object
- RedTokenAuth::Configuration
- Defined in:
- lib/red_token_auth/configuration.rb
Instance Attribute Summary collapse
-
#email_regex ⇒ Object
Returns the value of attribute email_regex.
-
#password_length ⇒ Object
Returns the value of attribute password_length.
-
#password_regex ⇒ Object
Returns the value of attribute password_regex.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
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_regex ⇒ Object
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_length ⇒ Object
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_regex ⇒ Object
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 |