Class: SourceReaders::InspecReader
- Inherits:
-
Object
- Object
- SourceReaders::InspecReader
- Defined in:
- lib/source_readers/inspec.rb
Instance Attribute Summary collapse
-
#data_files ⇒ Object
readonly
Returns the value of attribute data_files.
-
#libraries ⇒ Object
readonly
Returns the value of attribute libraries.
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
-
#metadata_src ⇒ Object
readonly
Returns the value of attribute metadata_src.
-
#readme ⇒ Object
readonly
Returns the value of attribute readme.
-
#target ⇒ Object
readonly
Returns the value of attribute target.
-
#tests ⇒ Object
readonly
Returns the value of attribute tests.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(target, metadata_source) ⇒ InspecReader
constructor
This create a new instance of an InSpec profile source reader.
Constructor Details
#initialize(target, metadata_source) ⇒ InspecReader
This create a new instance of an InSpec profile source reader
21 22 23 24 25 26 27 28 |
# File 'lib/source_readers/inspec.rb', line 21 def initialize(target, ) @target = target @metadata = () @tests = load_tests @libraries = load_libs @data_files = load_data_files @readme = load_readme end |
Instance Attribute Details
#data_files ⇒ Object (readonly)
Returns the value of attribute data_files.
15 16 17 |
# File 'lib/source_readers/inspec.rb', line 15 def data_files @data_files end |
#libraries ⇒ Object (readonly)
Returns the value of attribute libraries.
15 16 17 |
# File 'lib/source_readers/inspec.rb', line 15 def libraries @libraries end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
15 16 17 |
# File 'lib/source_readers/inspec.rb', line 15 def @metadata end |
#metadata_src ⇒ Object (readonly)
Returns the value of attribute metadata_src.
15 16 17 |
# File 'lib/source_readers/inspec.rb', line 15 def @metadata_src end |
#readme ⇒ Object (readonly)
Returns the value of attribute readme.
15 16 17 |
# File 'lib/source_readers/inspec.rb', line 15 def readme @readme end |
#target ⇒ Object (readonly)
Returns the value of attribute target.
15 16 17 |
# File 'lib/source_readers/inspec.rb', line 15 def target @target end |
#tests ⇒ Object (readonly)
Returns the value of attribute tests.
15 16 17 |
# File 'lib/source_readers/inspec.rb', line 15 def tests @tests end |
Class Method Details
.resolve(target) ⇒ Object
9 10 11 12 13 |
# File 'lib/source_readers/inspec.rb', line 9 def self.resolve(target) return new(target, "inspec.yml") if target.files.include?("inspec.yml") nil end |