Class: FSPath::Tempfile
- Inherits:
-
Tempfile
- Object
- Tempfile
- FSPath::Tempfile
- Defined in:
- lib/fspath.rb
Instance Method Summary collapse
-
#initialize(path_klass, *args) ⇒ Tempfile
constructor
A new instance of Tempfile.
- #path ⇒ Object
Constructor Details
#initialize(path_klass, *args) ⇒ Tempfile
Returns a new instance of Tempfile.
7 8 9 10 11 |
# File 'lib/fspath.rb', line 7 def initialize(path_klass, *args) raise ArgumentError.new("#{path_klass.inspect} is not a class") unless path_klass.is_a?(Class) @path_klass = path_klass super(*args) end |
Instance Method Details
#path ⇒ Object
13 14 15 |
# File 'lib/fspath.rb', line 13 def path @path_klass.new(super) end |