Class: SqAuth::SqAuthUser::RackUser
- Defined in:
- lib/sq_auth/sq_auth_user/rack_user.rb
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
Methods inherited from BasicUser
Instance Attribute Details
#user_ip ⇒ Object
Returns the value of attribute user_ip.
4 5 6 |
# File 'lib/sq_auth/sq_auth_user/rack_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/rack_user.rb', line 4 def user_name @user_name end |
Instance Method Details
#current_user ⇒ Object
6 7 8 |
# File 'lib/sq_auth/sq_auth_user/rack_user.rb', line 6 def current_user {name: (user_name || "Anonymous"), ip: (user_ip || "127.0.0.1")} end |