Class: Inspec::MockProvider

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

Overview

class FileProvider

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from FileProvider

#binread, for_path, #relative_provider

Constructor Details

#initialize(path) ⇒ MockProvider

Returns a new instance of MockProvider.



71
72
73
74
# File 'lib/inspec/file_provider.rb', line 71

def initialize(path)
  @data = path[:mock]
  @files = @data.keys
end

Instance Attribute Details

#filesObject (readonly)

Returns the value of attribute files.



70
71
72
# File 'lib/inspec/file_provider.rb', line 70

def files
  @files
end

Instance Method Details

#read(file) ⇒ Object



76
77
78
# File 'lib/inspec/file_provider.rb', line 76

def read(file)
  @data[file]
end