class method
self.open
Ruby on Rails 3.2.22.5
Since v3.2.22.5 Last seen in v3.2.22.5Signature
self.open(file)
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.
Parameters
-
filereq
Source
# File activerecord/lib/active_record/fixtures/file.rb, line 18
def self.open(file)
x = new file
block_given? ? yield(x) : x
end
Defined in activerecord/lib/active_record/fixtures/file.rb line 18
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::Fixtures::File