Class: Cassette::Authentication::User
- Inherits:
-
Object
- Object
- Cassette::Authentication::User
- Extended by:
- Forwardable
- Defined in:
- lib/cassette/authentication/user.rb
Instance Attribute Summary collapse
-
#authorities ⇒ Object
Returns the value of attribute authorities.
-
#email ⇒ Object
Returns the value of attribute email.
-
#login ⇒ Object
Returns the value of attribute login.
-
#name ⇒ Object
Returns the value of attribute name.
-
#ticket ⇒ Object
Returns the value of attribute ticket.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ User
constructor
A new instance of User.
Constructor Details
#initialize(attrs = {}) ⇒ User
Returns a new instance of User.
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/cassette/authentication/user.rb', line 15 def initialize(attrs = {}) config = attrs[:config] @login = attrs[:login] @name = attrs[:name] @type = attrs[:type] @email = attrs[:email] @ticket = attrs[:ticket] @authorities = Cassette::Authentication::Authorities .parse(attrs.fetch(:authorities, '[]'), config && config.) end |
Instance Attribute Details
#authorities ⇒ Object
Returns the value of attribute authorities.
12 13 14 |
# File 'lib/cassette/authentication/user.rb', line 12 def @authorities end |
#email ⇒ Object
Returns the value of attribute email.
12 13 14 |
# File 'lib/cassette/authentication/user.rb', line 12 def email @email end |
#login ⇒ Object
Returns the value of attribute login.
12 13 14 |
# File 'lib/cassette/authentication/user.rb', line 12 def login @login end |
#name ⇒ Object
Returns the value of attribute name.
12 13 14 |
# File 'lib/cassette/authentication/user.rb', line 12 def name @name end |
#ticket ⇒ Object
Returns the value of attribute ticket.
12 13 14 |
# File 'lib/cassette/authentication/user.rb', line 12 def ticket @ticket end |
#type ⇒ Object
Returns the value of attribute type.
12 13 14 |
# File 'lib/cassette/authentication/user.rb', line 12 def type @type end |