Sha256: 433682bfc1fa2d3e50813224f0460e42f19a551ebda71aa494c7c005fbd1ece5
Contents?: true
Size: 476 Bytes
Versions: 9
Compression:
Stored size: 476 Bytes
Contents
module Faker class File < Base class << self def extension fetch('file.extension') end def mime_type fetch('file.mime_type') end def file_name(dir = nil, name = nil, ext = nil, directory_separator = '/') dir = Faker::Internet::slug unless dir name = Faker::Lorem::word.downcase unless name ext ||= extension [dir, name].join(directory_separator) + ".#{ext}" end end end end
Version data entries
9 entries across 9 versions & 1 rubygems