Class: SqAuth::SqAuthUser::RackUser

Inherits:
BasicUser
  • Object
show all
Defined in:
lib/sq_auth/sq_auth_user/rack_user.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from BasicUser

#[]

Instance Attribute Details

#user_ipObject

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_nameObject

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_userObject



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