Class: ChefCLI::Policyfile::Reports::Install
- Inherits:
 - 
      Object
      
        
- Object
 - ChefCLI::Policyfile::Reports::Install
 
 
- Defined in:
 - lib/chef-cli/policyfile/reports/install.rb
 
Instance Attribute Summary collapse
- 
  
    
      #policyfile_compiler  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute policyfile_compiler.
 - 
  
    
      #ui  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute ui.
 
Instance Method Summary collapse
- 
  
    
      #initialize(ui: nil, policyfile_compiler: nil)  ⇒ Install 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of Install.
 - #installing_cookbook(cookbook_spec) ⇒ Object
 - #installing_fixed_version_cookbook(cookbook_spec) ⇒ Object
 
Constructor Details
#initialize(ui: nil, policyfile_compiler: nil) ⇒ Install
Returns a new instance of Install.
      29 30 31 32 33 34 35  | 
    
      # File 'lib/chef-cli/policyfile/reports/install.rb', line 29 def initialize(ui: nil, policyfile_compiler: nil) @ui = ui @policyfile_compiler = policyfile_compiler @fixed_version_install_table = nil @install_table = nil end  | 
  
Instance Attribute Details
#policyfile_compiler ⇒ Object (readonly)
Returns the value of attribute policyfile_compiler.
      27 28 29  | 
    
      # File 'lib/chef-cli/policyfile/reports/install.rb', line 27 def policyfile_compiler @policyfile_compiler end  | 
  
#ui ⇒ Object (readonly)
Returns the value of attribute ui.
      26 27 28  | 
    
      # File 'lib/chef-cli/policyfile/reports/install.rb', line 26 def ui @ui end  | 
  
Instance Method Details
#installing_cookbook(cookbook_spec) ⇒ Object
      42 43 44 45  | 
    
      # File 'lib/chef-cli/policyfile/reports/install.rb', line 42 def installing_cookbook(cookbook_spec) verb = cookbook_spec.installed? ? "Using " : "Installing" install_table.print_row(verb, cookbook_spec.name, cookbook_spec.version_constraint.version) end  | 
  
#installing_fixed_version_cookbook(cookbook_spec) ⇒ Object
      37 38 39 40  | 
    
      # File 'lib/chef-cli/policyfile/reports/install.rb', line 37 def installing_fixed_version_cookbook(cookbook_spec) verb = cookbook_spec.installed? ? "Using " : "Installing" fixed_version_install_table.print_row(verb, cookbook_spec.name, cookbook_spec.version_constraint.to_s, "from #{cookbook_spec.source_type}") end  |