Sha256: 2fd02bcd3abf98dada672bbfcb28b3351bd91777b7ee1cb4559d657252339c06
Contents?: true
Size: 447 Bytes
Versions: 48
Compression:
Stored size: 447 Bytes
Contents
require 'mspec/guards/feature' class Object # This helper simplifies passing file access modes regardless of # whether the :encoding feature is enabled. Only the access specifier # itself will be returned if :encoding is not enabled. Otherwise, # the full mode string will be returned (i.e. the helper is a no-op). def fmode(mode) if FeatureGuard.enabled? :encoding mode else mode.split(':').first end end end
Version data entries
48 entries across 48 versions & 3 rubygems