Class: ProjectUsers
- Inherits:
-
Object
- Object
- ProjectUsers
- Defined in:
- lib/ft_42.rb
Instance Attribute Summary collapse
-
#project_users ⇒ Object
readonly
Returns the value of attribute project_users.
Instance Method Summary collapse
- #in_progress ⇒ Object
-
#initialize(project_users_response) ⇒ ProjectUsers
constructor
A new instance of ProjectUsers.
- #logins ⇒ Object
Constructor Details
#initialize(project_users_response) ⇒ ProjectUsers
Returns a new instance of ProjectUsers.
229 230 231 232 |
# File 'lib/ft_42.rb', line 229 def initialize(project_users_response) @project_users = project_users_response @project_users.flatten! end |
Instance Attribute Details
#project_users ⇒ Object (readonly)
Returns the value of attribute project_users.
227 228 229 |
# File 'lib/ft_42.rb', line 227 def project_users @project_users end |
Instance Method Details
#in_progress ⇒ Object
238 239 240 241 |
# File 'lib/ft_42.rb', line 238 def in_progress in_progress = project_users.select { |user_project| user_project["status"] == "in_progress" } in_progress.map { |user_project| user_project["user"]["login"] } end |
#logins ⇒ Object
234 235 236 |
# File 'lib/ft_42.rb', line 234 def logins project_users.map { |user_project| user_project["user"]["login"] } end |