Class: FTPMVC::Authenticator::Basic
- Inherits:
-
Struct
- Object
- Struct
- FTPMVC::Authenticator::Basic
- Defined in:
- lib/ftpmvc/authenticator/basic.rb
Instance Attribute Summary collapse
-
#users ⇒ Object
Returns the value of attribute users.
Instance Method Summary collapse
- #authenticate(username, password) ⇒ Object
-
#initialize(options = {}) ⇒ Basic
constructor
A new instance of Basic.
Constructor Details
#initialize(options = {}) ⇒ Basic
Returns a new instance of Basic.
4 5 6 |
# File 'lib/ftpmvc/authenticator/basic.rb', line 4 def initialize(={}) super [:users] end |
Instance Attribute Details
#users ⇒ Object
Returns the value of attribute users
3 4 5 |
# File 'lib/ftpmvc/authenticator/basic.rb', line 3 def users @users end |
Instance Method Details
#authenticate(username, password) ⇒ Object
8 9 10 |
# File 'lib/ftpmvc/authenticator/basic.rb', line 8 def authenticate(username, password) users[username] == password end |