null_store.rb 399 B

123456789101112131415161718192021
  1. module Docs
  2. class NullStore < AbstractStore
  3. def initialize
  4. super '/'
  5. end
  6. private
  7. def nil(*args)
  8. nil
  9. end
  10. alias_method :read_file, :nil
  11. alias_method :create_file, :nil
  12. alias_method :update_file, :nil
  13. alias_method :delete_file, :nil
  14. alias_method :file_exist?, :nil
  15. alias_method :file_mtime, :nil
  16. alias_method :list_files, :nil
  17. end
  18. end