class MyFile < File def MyFile.ftype(*args) return "The type is #{super}." endendFile.ftype("/bin") # => "directory"puts MyFile.ftype("/bin") # => "The type is directory."