Method: Web2Go::MockFile#initialize
- Defined in:
- lib/Web2Go/MockRequest.rb
#initialize(filename, content = nil) ⇒ MockFile
Returns a new instance of MockFile.
13 14 15 16 17 18 19 20 21 |
# File 'lib/Web2Go/MockRequest.rb', line 13 def initialize(filename,content=nil) @filename = filename if content.nil? then File.open(filename,"r") do |f| content = f.read end end @content = content end |