Class: Inspec::MockProvider

Inherits:
FileProvider show all
Defined in:
lib/inspec/file_provider.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from FileProvider

for_path, #relative_provider

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

#filesObject (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