Module: CatchNotes::Base::AuthItems::ClassMethods
- Defined in:
- lib/catch_notes/base.rb
Instance Method Summary collapse
- #password(password) ⇒ Object
- #username(username) ⇒ Object
- #valid_password? ⇒ Boolean
- #valid_username? ⇒ Boolean
Instance Method Details
#password(password) ⇒ Object
20 21 22 |
# File 'lib/catch_notes/base.rb', line 20 def password( password ) send(:basic_auth, get_auth[:username] || '', password) end |
#username(username) ⇒ Object
16 17 18 |
# File 'lib/catch_notes/base.rb', line 16 def username( username ) send(:basic_auth, username, get_auth[:password] || '') end |
#valid_password? ⇒ Boolean
29 30 31 32 |
# File 'lib/catch_notes/base.rb', line 29 def valid_password? password = get_auth[:password] !(password.nil? || password == '') end |
#valid_username? ⇒ Boolean
24 25 26 27 |
# File 'lib/catch_notes/base.rb', line 24 def valid_username? username = get_auth[:username] !(username.nil? || username == '') end |