Module: Fake

Defined in:
lib/fake.rb

Overview

Helper module to tuck away some ugly file operations

Constant Summary collapse

REQUEST =
0
RESPONSE =
1

Class Method Summary collapse

Class Method Details

.to_array(cache_file) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/fake.rb', line 6

def self.to_array(cache_file)
  if File.exist?(cache_file)
    File.open(cache_file, "r") do |f|
      YAML.load(f.read)
    end
  end || []
end