Sha256: 92b8714ed7cdd18c7a15861407272a9f1197126d609b10820d203c2c29e3e017

Contents?: true

Size: 535 Bytes

Versions: 6

Compression:

Stored size: 535 Bytes

Contents

# frozen_string_literal: true

module FFaker
  module Filesystem
    extend ModuleUtils
    extend self

    def extension
      fetch_sample(EXTENSION)
    end

    def mime_type
      fetch_sample(MIME_TYPE)
    end

    def directory(directory_separator = File::SEPARATOR)
      Lorem.words.join(directory_separator)
    end

    def file_name(dir = directory, name = Lorem.word.downcase,
                  ext = extension, directory_separator = File::SEPARATOR)
      "#{dir}#{directory_separator}#{name}.#{ext}"
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ffaker-2.22.0 lib/ffaker/filesystem.rb
ffaker-2.21.0 lib/ffaker/filesystem.rb
ffaker-2.20.0 lib/ffaker/filesystem.rb
ffaker-2.19.0 lib/ffaker/filesystem.rb
ffaker-2.18.0 lib/ffaker/filesystem.rb
ffaker-2.17.0 lib/ffaker/filesystem.rb