Class: Fi::File
- Inherits:
-
File
- Object
- File
- Fi::File
- Defined in:
- lib/fi/file.rb
Instance Method Summary collapse
- #content ⇒ Object
-
#initialize(path, content = '') ⇒ File
constructor
A new instance of File.
Constructor Details
#initialize(path, content = '') ⇒ File
Returns a new instance of File.
3 4 5 6 7 8 |
# File 'lib/fi/file.rb', line 3 def initialize(path, content='') @path = path ::File.open(@path, 'w+') do |f| f.write content end end |