Class: Reactor::Session::User
- Inherits:
-
Object
- Object
- Reactor::Session::User
- Defined in:
- lib/reactor/session/user.rb
Instance Attribute Summary collapse
-
#email ⇒ Object
readonly
Returns the value of attribute email.
-
#groups ⇒ Object
readonly
Returns the value of attribute groups.
-
#language ⇒ Object
readonly
Returns the value of attribute language.
-
#user_name ⇒ Object
readonly
Returns the value of attribute user_name.
Instance Method Summary collapse
-
#initialize(user_name) ⇒ User
constructor
A new instance of User.
- #superuser? ⇒ Boolean
- #to_s ⇒ Object
Constructor Details
#initialize(user_name) ⇒ User
Returns a new instance of User.
7 8 9 10 11 12 13 14 15 |
# File 'lib/reactor/session/user.rb', line 7 def initialize(user_name) # Rails.logger.debug "Reading user #{user_name} from CM" user = Reactor::Cm::User.new(user_name) @user_name= user_name @groups = user.groups @language = user.language @superuser= user.is_root? @email = user.email end |
Instance Attribute Details
#email ⇒ Object (readonly)
Returns the value of attribute email.
21 22 23 |
# File 'lib/reactor/session/user.rb', line 21 def email @email end |
#groups ⇒ Object (readonly)
Returns the value of attribute groups.
21 22 23 |
# File 'lib/reactor/session/user.rb', line 21 def groups @groups end |
#language ⇒ Object (readonly)
Returns the value of attribute language.
21 22 23 |
# File 'lib/reactor/session/user.rb', line 21 def language @language end |
#user_name ⇒ Object (readonly)
Returns the value of attribute user_name.
21 22 23 |
# File 'lib/reactor/session/user.rb', line 21 def user_name @user_name end |
Instance Method Details
#superuser? ⇒ Boolean
23 24 25 |
# File 'lib/reactor/session/user.rb', line 23 def superuser? @superuser == true end |
#to_s ⇒ Object
17 18 19 |
# File 'lib/reactor/session/user.rb', line 17 def to_s @user_name end |