class FC::File

Attributes

path[R]

Public Class Methods

new(filepath) click to toggle source
# File lib/fc.rb, line 14
def initialize(filepath)
  raise Error::FileDoesNotExist unless ::File.file?(filepath)

  @path = filepath
end

Public Instance Methods

ext() click to toggle source
# File lib/fc.rb, line 24
def ext
  @ext ||= ::File.extname(path).delete!('.')
end
name() click to toggle source
# File lib/fc.rb, line 20
def name
  @name ||= ::File.basename(path)
end