Class: ProjectUsersPrinter

Inherits:
Object
  • Object
show all
Defined in:
lib/ft_42.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(project_users) ⇒ ProjectUsersPrinter

Returns a new instance of ProjectUsersPrinter.



356
357
358
359
# File 'lib/ft_42.rb', line 356

def initialize(project_users)
  @pastel = Pastel.new
  @project_users = project_users
end

Instance Attribute Details

#pastelObject (readonly)

Returns the value of attribute pastel.



354
355
356
# File 'lib/ft_42.rb', line 354

def pastel
  @pastel
end

#project_usersObject (readonly)

Returns the value of attribute project_users.



354
355
356
# File 'lib/ft_42.rb', line 354

def project_users
  @project_users
end

Instance Method Details

#allObject



361
362
363
# File 'lib/ft_42.rb', line 361

def all
  usernames
end

#usernamesObject



365
366
367
368
369
370
# File 'lib/ft_42.rb', line 365

def usernames
  puts "Currenly working on project:"
  project_users.in_progress.each_with_index do |, i|
    puts "#{i + 1}. #{login}"
  end
end