Class: Tempfile
- Inherits:
-
Object
- Object
- Tempfile
- Defined in:
- lib/riel/tempfile.rb
Class Method Summary collapse
-
.open(*args, &blk) ⇒ Object
this works around the behavior (fixed in 1.9) so that open returns the new temporary file instead of nil.
- .original_open ⇒ Object
Class Method Details
.open(*args, &blk) ⇒ Object
this works around the behavior (fixed in 1.9) so that open returns the new temporary file instead of nil.
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/riel/tempfile.rb', line 13 def open(*args, &blk) tempname = nil original_open(*args) do |tf| tempname = tf.path blk.call(tf) if blk end tempname end |
.original_open ⇒ Object
8 |
# File 'lib/riel/tempfile.rb', line 8 alias_method :original_open, :open |