Sha256: 30268f7c4116530b817c272090b1c721da73a0d8ff49c284a6830646e8cfe3a9

Contents?: true

Size: 527 Bytes

Versions: 2

Compression:

Stored size: 527 Bytes

Contents

# frozen_string_literal: true

require "delegate"
require "staticky-files"

module Staticky
  class Filesystem < SimpleDelegator
    def self.test
      files = Staticky::Files.new(memory: true)
      new(files)
    end

    def self.real
      files = Staticky::Files.new
      new(files)
    end

    def touch(*files)
      files.each do |file|
        super(file)
      end
    end

    def children(directory)
      tokens = [".", ".."]
      entries(directory).reject { |entry| tokens.include?(entry) }
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
staticky-0.1.1 lib/staticky/filesystem.rb
staticky-0.1.0 lib/staticky/filesystem.rb