class FileName
Attributes
dirname[R]
filename[R]
path[R]
Public Class Methods
new(path)
click to toggle source
# File lib/models/files/file_name.rb, line 3 def initialize(path) @path = path @dirname, @filename = File.split(path) end
Public Instance Methods
extname()
click to toggle source
# File lib/models/files/file_name.rb, line 8 def extname File.extname(@filename) end
name()
click to toggle source
# File lib/models/files/file_name.rb, line 12 def name File.basename(@filename, '.*') end
no_dir?()
click to toggle source
# File lib/models/files/file_name.rb, line 16 def no_dir? return @dirname == '.' end