Parent

Included Modules

Class/Module Index [+]

Quicksearch

Rabbit::Source::File

Public Class Methods

initial_args_description() click to toggle source
# File lib/rabbit/source/file.rb, line 8
def self.initial_args_description
  N_("[FILENAME]")
end
new(encoding, logger, name) click to toggle source
# File lib/rabbit/source/file.rb, line 12
def initialize(encoding, logger, name)
  @name = name
  super(encoding, logger)
  @mtime = nil
end

Public Instance Methods

_read() click to toggle source
# File lib/rabbit/source/file.rb, line 18
def _read
  begin
    check_file
    ::File.open(@name) do |f|
      @mtime = f.mtime
      f.read
    end
  rescue SourceUnreadableError
    @logger.error($!.message)
    @mtime = Time.now + LimitAccessInterval::MINIMUM_ACCESS_TIME
    ""
  end
end
extension() click to toggle source
# File lib/rabbit/source/file.rb, line 36
def extension
  extract_extension(@name)
end
need_read?() click to toggle source
# File lib/rabbit/source/file.rb, line 32
def need_read?
  super or old?(@mtime, :mtime)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.