Sha256: e99c97b4e11bda6cabc265aa895fd8c8c6892414738ecc083342f45b950e0499
Contents?: true
Size: 452 Bytes
Versions: 1
Compression:
Stored size: 452 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 name ||= Faker::Lorem.word.downcase ext ||= extension [dir, name].join(directory_separator) + ".#{ext}" end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
faker-1.9.1 | lib/faker/file.rb |