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

Version Path
rhodes-5.5.18 lib/extensions/mspec/mspec/helpers/fmode.rb
rhodes-5.5.17 lib/extensions/mspec/mspec/helpers/fmode.rb
rhodes-5.5.15 lib/extensions/mspec/mspec/helpers/fmode.rb
rhodes-5.5.0.22 lib/extensions/mspec/mspec/helpers/fmode.rb
rhodes-5.5.2 lib/extensions/mspec/mspec/helpers/fmode.rb
rhodes-5.5.0.7 lib/extensions/mspec/mspec/helpers/fmode.rb
rhodes-5.5.0.3 lib/extensions/mspec/mspec/helpers/fmode.rb
rhodes-5.5.0 lib/extensions/mspec/mspec/helpers/fmode.rb
tauplatform-1.0.3 lib/extensions/mspec/mspec/helpers/fmode.rb
tauplatform-1.0.2 lib/extensions/mspec/mspec/helpers/fmode.rb
tauplatform-1.0.1 lib/extensions/mspec/mspec/helpers/fmode.rb
rhodes-3.5.1.12 lib/extensions/mspec/mspec/helpers/fmode.rb
rhodes-3.3.5 lib/extensions/mspec/mspec/helpers/fmode.rb
rhodes-3.4.2 lib/extensions/mspec/mspec/helpers/fmode.rb
rhodes-3.3.4 lib/extensions/mspec/mspec/helpers/fmode.rb
rhodes-3.3.3 lib/extensions/mspec/mspec/helpers/fmode.rb
rhodes-3.3.3.beta.4 lib/extensions/mspec/mspec/helpers/fmode.rb
rhodes-3.3.3.beta.3 lib/extensions/mspec/mspec/helpers/fmode.rb
rhodes-3.3.3.beta.2 lib/extensions/mspec/mspec/helpers/fmode.rb
rhodes-3.3.3.beta.1 lib/extensions/mspec/mspec/helpers/fmode.rb