class Note

Public Class Methods

new(path) click to toggle source
Calls superclass method FileName::new
# File lib/models/files/note.rb, line 12
def initialize(path)
  super
  unless no_dir?
    @dirname = File.expand_path(@dirname)
    @path = File.expand_path(@path)
  end
end
touch(path) click to toggle source
# 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