Class: BBC::Redux::User
- Inherits:
-
Object
- Object
- BBC::Redux::User
- Defined in:
- lib/bbc/redux/user.rb
Overview
Redux API User Object
Instance Attribute Summary collapse
-
#can_invite ⇒ Boolean
(also: #can_invite?)
readonly
Whether the user has ability to invite others to Redux.
-
#created ⇒ DateTime
readonly
The date on which user account was created.
-
#department ⇒ String
readonly
The user’s organisational department.
-
#division ⇒ String
readonly
The user’s organisational division.
-
#email ⇒ String
readonly
The user’s email.
-
#first_name ⇒ String
readonly
The user’s first name.
-
#id ⇒ Integer
readonly
The user’s id.
-
#last_name ⇒ String
readonly
The user’s last name.
-
#legal_accepted ⇒ String
readonly
Whether the user has accepted the T&C’s.
-
#legal_html ⇒ String
readonly
A blob of T&C’s HTML that the user may need to accept.
-
#must_sign_terms? ⇒ String
readonly
Whether the user must sign some T&C’s before proceeding.
-
#name ⇒ String
readonly
The user’s full name.
-
#permitted_services ⇒ Array<String>
readonly
A list of services user has access to.
-
#username ⇒ String
readonly
The user’s username.
-
#uuid ⇒ String
readonly
The user’s uuid.
Instance Attribute Details
#can_invite ⇒ Boolean (readonly) Also known as: can_invite?
Returns whether the user has ability to invite others to Redux.
35 |
# File 'lib/bbc/redux/user.rb', line 35 attribute :can_invite, Boolean |
#created ⇒ DateTime (readonly)
Returns the date on which user account was created.
41 |
# File 'lib/bbc/redux/user.rb', line 41 attribute :created, DateTime |
#department ⇒ String (readonly)
Returns the user’s organisational department.
45 |
# File 'lib/bbc/redux/user.rb', line 45 attribute :department, String, :default => '' |
#division ⇒ String (readonly)
Returns the user’s organisational division.
49 |
# File 'lib/bbc/redux/user.rb', line 49 attribute :division, String, :default => '' |
#email ⇒ String (readonly)
Returns the user’s email.
53 |
# File 'lib/bbc/redux/user.rb', line 53 attribute :email, String, :default => '' |
#first_name ⇒ String (readonly)
Returns the user’s first name.
86 87 88 |
# File 'lib/bbc/redux/user.rb', line 86 def first_name name.split(' ').first end |
#id ⇒ Integer (readonly)
Returns the user’s id.
57 |
# File 'lib/bbc/redux/user.rb', line 57 attribute :id, Integer |
#last_name ⇒ String (readonly)
Returns the user’s last name.
92 93 94 |
# File 'lib/bbc/redux/user.rb', line 92 def last_name name.split(' ').last end |
#legal_accepted ⇒ String (readonly)
Returns whether the user has accepted the T&C’s.
62 |
# File 'lib/bbc/redux/user.rb', line 62 attribute :legal_accepted, Boolean, :default => true |
#legal_html ⇒ String (readonly)
Returns a blob of T&C’s HTML that the user may need to accept.
66 |
# File 'lib/bbc/redux/user.rb', line 66 attribute :legal_html, String, :default => '' |
#must_sign_terms? ⇒ String (readonly)
Returns whether the user must sign some T&C’s before proceeding.
100 101 102 |
# File 'lib/bbc/redux/user.rb', line 100 def must_sign_terms? !legal_accepted end |
#name ⇒ String (readonly)
Returns the user’s full name.
70 |
# File 'lib/bbc/redux/user.rb', line 70 attribute :name, String, :default => '' |
#permitted_services ⇒ Array<String> (readonly)
Returns a list of services user has access to.
74 |
# File 'lib/bbc/redux/user.rb', line 74 attribute :permitted_services, Array[String], :default => [] |
#username ⇒ String (readonly)
Returns the user’s username.
78 |
# File 'lib/bbc/redux/user.rb', line 78 attribute :username, String, :default => '' |
#uuid ⇒ String (readonly)
Returns the user’s uuid.
82 |
# File 'lib/bbc/redux/user.rb', line 82 attribute :uuid, String |