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
19 20 21 |
# File 'lib/catch_notes/base.rb', line 19 def password( password ) send(:basic_auth, get_auth[:username] || '', password) end |
#username(username) ⇒ Object
15 16 17 |
# File 'lib/catch_notes/base.rb', line 15 def username( username ) send(:basic_auth, username, get_auth[:password] || '') end |
#valid_password? ⇒ Boolean
28 29 30 31 |
# File 'lib/catch_notes/base.rb', line 28 def valid_password? password = get_auth[:password] !(password.nil? || password == '') end |
#valid_username? ⇒ Boolean
23 24 25 26 |
# File 'lib/catch_notes/base.rb', line 23 def valid_username? username = get_auth[:username] !(username.nil? || username == '') end |