Class: ChefCLI::PolicyfileLock::InstallReport
- Inherits:
 - 
      Object
      
        
- Object
 - ChefCLI::PolicyfileLock::InstallReport
 
 
- Defined in:
 - lib/chef-cli/policyfile_lock.rb
 
Instance Attribute Summary collapse
- 
  
    
      #policyfile_lock  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute policyfile_lock.
 - 
  
    
      #ui  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute ui.
 
Instance Method Summary collapse
- 
  
    
      #initialize(ui: nil, policyfile_lock: nil)  ⇒ InstallReport 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of InstallReport.
 - #installing_cookbook(cookbook_lock) ⇒ Object
 - #installing_fixed_version_cookbook(cookbook_spec) ⇒ Object
 
Constructor Details
#initialize(ui: nil, policyfile_lock: nil) ⇒ InstallReport
Returns a new instance of InstallReport.
      34 35 36 37 38 39 40  | 
    
      # File 'lib/chef-cli/policyfile_lock.rb', line 34 def initialize(ui: nil, policyfile_lock: nil) @ui = ui @policyfile_lock = policyfile_lock @cookbook_name_width = nil @cookbook_version_width = nil end  | 
  
Instance Attribute Details
#policyfile_lock ⇒ Object (readonly)
Returns the value of attribute policyfile_lock.
      32 33 34  | 
    
      # File 'lib/chef-cli/policyfile_lock.rb', line 32 def policyfile_lock @policyfile_lock end  | 
  
#ui ⇒ Object (readonly)
Returns the value of attribute ui.
      31 32 33  | 
    
      # File 'lib/chef-cli/policyfile_lock.rb', line 31 def ui @ui end  | 
  
Instance Method Details
#installing_cookbook(cookbook_lock) ⇒ Object
      47 48 49 50  | 
    
      # File 'lib/chef-cli/policyfile_lock.rb', line 47 def installing_cookbook(cookbook_lock) verb = cookbook_lock.installed? ? "Using " : "Installing" ui.msg("#{verb} #{format_cookbook(cookbook_lock)}") end  | 
  
#installing_fixed_version_cookbook(cookbook_spec) ⇒ Object
      42 43 44 45  | 
    
      # File 'lib/chef-cli/policyfile_lock.rb', line 42 def installing_fixed_version_cookbook(cookbook_spec) verb = cookbook_spec.installed? ? "Using " : "Installing" ui.msg("#{verb} #{format_fixed_version_cookbook(cookbook_spec)}") end  |