Method: ActiveRecord::FixtureSet::File.open

Defined in:
lib/active_record/fixture_set/file.rb

.open(file) ⇒ Object

Open a fixture file named file. When called with a block, the block is called with the filehandle and the filehandle is automatically closed when the block finishes.



14
15
16
17
# File 'lib/active_record/fixture_set/file.rb', line 14

def self.open(file)
  x = new file
  block_given? ? yield(x) : x
end