Class: Note
Instance Attribute Summary
Attributes inherited from FileName
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(path) ⇒ Note
constructor
A new instance of Note.
Methods inherited from FileName
Constructor Details
#initialize(path) ⇒ Note
Returns a new instance of Note.
12 13 14 15 16 17 18 |
# File 'lib/models/files/note.rb', line 12 def initialize(path) super unless no_dir? @dirname = File.(@dirname) @path = File.(@path) end end |
Class Method Details
.touch(path) ⇒ Object
5 6 7 8 9 10 |
# File 'lib/models/files/note.rb', line 5 def self.touch(path) note = new(path) FileUtils.makedirs(note.dirname) FileUtils.touch(note.path) return note end |