Class: SqAuth::SqAuthUser::BasicUser
- Inherits:
-
Object
- Object
- SqAuth::SqAuthUser::BasicUser
- Defined in:
- lib/sq_auth/sq_auth_user/basic_user.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#user_ip ⇒ Object
Returns the value of attribute user_ip.
-
#user_name ⇒ Object
Returns the value of attribute user_name.
Instance Method Summary collapse
Instance Attribute Details
#user_ip ⇒ Object
Returns the value of attribute user_ip.
4 5 6 |
# File 'lib/sq_auth/sq_auth_user/basic_user.rb', line 4 def user_ip @user_ip end |
#user_name ⇒ Object
Returns the value of attribute user_name.
4 5 6 |
# File 'lib/sq_auth/sq_auth_user/basic_user.rb', line 4 def user_name @user_name end |
Instance Method Details
#[](key) ⇒ Object
9 10 11 |
# File 'lib/sq_auth/sq_auth_user/basic_user.rb', line 9 def [] key {name: (user_name || "Anonymous"), ip: (user_ip || "127.0.0.1")}[key] end |
#current_user ⇒ Object
5 6 7 |
# File 'lib/sq_auth/sq_auth_user/basic_user.rb', line 5 def current_user self end |