module Filepath::MethodDelegation

Public Instance Methods

define_file_method(filepath_method, file_method = nil) click to toggle source

@private

# File lib/filepath/filepath.rb, line 737
def define_file_method(filepath_method, file_method = nil)
        file_method ||= filepath_method
        define_method(filepath_method) do |*args|
                all_args = args + [self]
                return File.send(file_method, *all_args)
        end
end
define_filetest_method(filepath_method, filetest_method = nil) click to toggle source

@private

# File lib/filepath/filepath.rb, line 746
def define_filetest_method(filepath_method, filetest_method = nil)
        filetest_method ||= filepath_method
        define_method(filepath_method) do
                return FileTest.send(filetest_method, self)
        end
end
define_io_method(filepath_method, io_method = nil) click to toggle source

@private

# File lib/filepath/filepath.rb, line 729
def define_io_method(filepath_method, io_method = nil)
        io_method ||= filepath_method
        define_method(filepath_method) do |*args, &block|
                return File.send(io_method, self, *args, &block)
        end
end