Class: ProjectUsersPrinter
- Inherits:
- 
      Object
      
        - Object
- ProjectUsersPrinter
 
- Defined in:
- lib/ft_42.rb
Instance Attribute Summary collapse
- 
  
    
      #pastel  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    Returns the value of attribute pastel. 
- 
  
    
      #project_users  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    Returns the value of attribute project_users. 
Instance Method Summary collapse
- #all ⇒ Object
- 
  
    
      #initialize(project_users)  ⇒ ProjectUsersPrinter 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of ProjectUsersPrinter. 
- #usernames ⇒ Object
Constructor Details
#initialize(project_users) ⇒ ProjectUsersPrinter
Returns a new instance of ProjectUsersPrinter.
| 348 349 350 351 | # File 'lib/ft_42.rb', line 348 def initialize(project_users) @pastel = Pastel.new @project_users = project_users end | 
Instance Attribute Details
#pastel ⇒ Object (readonly)
Returns the value of attribute pastel.
| 346 347 348 | # File 'lib/ft_42.rb', line 346 def pastel @pastel end | 
#project_users ⇒ Object (readonly)
Returns the value of attribute project_users.
| 346 347 348 | # File 'lib/ft_42.rb', line 346 def project_users @project_users end | 
Instance Method Details
#all ⇒ Object
| 353 354 355 | # File 'lib/ft_42.rb', line 353 def all usernames end | 
#usernames ⇒ Object
| 357 358 359 360 361 | # File 'lib/ft_42.rb', line 357 def usernames project_users.logins.each_with_index do |login, i| puts "#{i + 1}. #{login}" end end |