Class: Inspec::RunData::Profile
- Inherits:
- 
      Struct
      
        - Object
- Struct
- Inspec::RunData::Profile
 
- Includes:
- HashLikeStruct
- Defined in:
- lib/inspec/run_data/profile.rb,
 lib/inspec/run_data/profile.rb
Defined Under Namespace
Classes: Dependency, Group, Input, Support
Instance Attribute Summary collapse
- 
  
    
      #controls  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Returns the value of attribute controls. 
- 
  
    
      #copyright  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Returns the value of attribute copyright. 
- 
  
    
      #copyright_email  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Returns the value of attribute copyright_email. 
- 
  
    
      #depends  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Returns the value of attribute depends. 
- 
  
    
      #groups  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Returns the value of attribute groups. 
- 
  
    
      #inputs  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Returns the value of attribute inputs. 
- 
  
    
      #license  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Returns the value of attribute license. 
- 
  
    
      #maintainer  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Returns the value of attribute maintainer. 
- 
  
    
      #name  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Returns the value of attribute name. 
- 
  
    
      #parent_profile  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Returns the value of attribute parent_profile. 
- 
  
    
      #sha256  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Returns the value of attribute sha256. 
- 
  
    
      #status  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Returns the value of attribute status. 
- 
  
    
      #status_message  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Returns the value of attribute status_message. 
- 
  
    
      #summary  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Returns the value of attribute summary. 
- 
  
    
      #supports  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Returns the value of attribute supports. 
- 
  
    
      #title  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Returns the value of attribute title. 
- 
  
    
      #version  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Returns the value of attribute version. 
- 
  
    
      #waiver_data  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Returns the value of attribute waiver_data. 
Instance Method Summary collapse
- 
  
    
      #initialize(raw_prof_data)  ⇒ Profile 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of Profile. 
Methods included from HashLikeStruct
Constructor Details
#initialize(raw_prof_data) ⇒ Profile
Returns a new instance of Profile.
| 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | # File 'lib/inspec/run_data/profile.rb', line 24 def initialize(raw_prof_data) self.controls = (raw_prof_data[:controls] || []).map { |c| Inspec::RunData::Control.new(c) } self.depends = (raw_prof_data[:depends] || []).map { |d| Inspec::RunData::Profile::Dependency.new(d) } self.groups = (raw_prof_data[:groups] || []).map { |g| Inspec::RunData::Profile::Group.new(g) } self.inputs = (raw_prof_data[:inputs] || []).map { |i| Inspec::RunData::Profile::Input.new(i) } self.supports = (raw_prof_data[:supports] || []).map { |s| Inspec::RunData::Profile::Support.new(s) } %i{ copyright copyright_email license maintainer name sha256 status summary title version parent_profile status_message waiver_data }.each do |field| self[field] = raw_prof_data[field] end end | 
Instance Attribute Details
#controls ⇒ Object
Returns the value of attribute controls
| 3 4 5 | # File 'lib/inspec/run_data/profile.rb', line 3 def controls @controls end | 
#copyright ⇒ Object
Returns the value of attribute copyright
| 3 4 5 | # File 'lib/inspec/run_data/profile.rb', line 3 def copyright @copyright end | 
#copyright_email ⇒ Object
Returns the value of attribute copyright_email
| 3 4 5 | # File 'lib/inspec/run_data/profile.rb', line 3 def copyright_email @copyright_email end | 
#depends ⇒ Object
Returns the value of attribute depends
| 3 4 5 | # File 'lib/inspec/run_data/profile.rb', line 3 def depends @depends end | 
#groups ⇒ Object
Returns the value of attribute groups
| 3 4 5 | # File 'lib/inspec/run_data/profile.rb', line 3 def groups @groups end | 
#inputs ⇒ Object
Returns the value of attribute inputs
| 3 4 5 | # File 'lib/inspec/run_data/profile.rb', line 3 def inputs @inputs end | 
#license ⇒ Object
Returns the value of attribute license
| 3 4 5 | # File 'lib/inspec/run_data/profile.rb', line 3 def license @license end | 
#maintainer ⇒ Object
Returns the value of attribute maintainer
| 3 4 5 | # File 'lib/inspec/run_data/profile.rb', line 3 def maintainer @maintainer end | 
#name ⇒ Object
Returns the value of attribute name
| 3 4 5 | # File 'lib/inspec/run_data/profile.rb', line 3 def name @name end | 
#parent_profile ⇒ Object
Returns the value of attribute parent_profile
| 3 4 5 | # File 'lib/inspec/run_data/profile.rb', line 3 def parent_profile @parent_profile end | 
#sha256 ⇒ Object
Returns the value of attribute sha256
| 3 4 5 | # File 'lib/inspec/run_data/profile.rb', line 3 def sha256 @sha256 end | 
#status ⇒ Object
Returns the value of attribute status
| 3 4 5 | # File 'lib/inspec/run_data/profile.rb', line 3 def status @status end | 
#status_message ⇒ Object
Returns the value of attribute status_message
| 3 4 5 | # File 'lib/inspec/run_data/profile.rb', line 3 def @status_message end | 
#summary ⇒ Object
Returns the value of attribute summary
| 3 4 5 | # File 'lib/inspec/run_data/profile.rb', line 3 def summary @summary end | 
#supports ⇒ Object
Returns the value of attribute supports
| 3 4 5 | # File 'lib/inspec/run_data/profile.rb', line 3 def supports @supports end | 
#title ⇒ Object
Returns the value of attribute title
| 3 4 5 | # File 'lib/inspec/run_data/profile.rb', line 3 def title @title end | 
#version ⇒ Object
Returns the value of attribute version
| 3 4 5 | # File 'lib/inspec/run_data/profile.rb', line 3 def version @version end | 
#waiver_data ⇒ Object
Returns the value of attribute waiver_data
| 3 4 5 | # File 'lib/inspec/run_data/profile.rb', line 3 def waiver_data @waiver_data end |