Class: Inspec::MockProvider
- Inherits:
-
FileProvider
- Object
- FileProvider
- Inspec::MockProvider
- Defined in:
- lib/inspec/file_provider.rb
Instance Attribute Summary collapse
-
#files ⇒ Object
readonly
Returns the value of attribute files.
Instance Method Summary collapse
-
#initialize(path) ⇒ MockProvider
constructor
A new instance of MockProvider.
- #read(file) ⇒ Object
Methods inherited from FileProvider
Constructor Details
#initialize(path) ⇒ MockProvider
Returns a new instance of MockProvider.
42 43 44 45 |
# File 'lib/inspec/file_provider.rb', line 42 def initialize(path) @data = path[:mock] @files = @data.keys end |
Instance Attribute Details
#files ⇒ Object (readonly)
Returns the value of attribute files.
41 42 43 |
# File 'lib/inspec/file_provider.rb', line 41 def files @files end |
Instance Method Details
#read(file) ⇒ Object
47 48 49 |
# File 'lib/inspec/file_provider.rb', line 47 def read(file) @data[file] end |