Method: Clumsy::TestFile#initialize

Defined in:
lib/clumsy/test_file.rb

#initialize(file) ⇒ TestFile

Returns a new instance of TestFile.



4
5
6
7
8
9
10
11
# File 'lib/clumsy/test_file.rb', line 4

def initialize(file)
  begin
    @file = File.read(file)
    @data = Hashie::Mash.new JSON.parse(@file)
  rescue Errno::ENOENT
    raise 'File Not Found'
  end
end