Sha256: 46905e3a1a22d57de956d5c9d4d920d27eba5424d9536a1fc433318532b161ad

Contents?: true

Size: 450 Bytes

Versions: 8

Compression:

Stored size: 450 Bytes

Contents

MiscUtils.module_eval do
	# Like bite, but returns the first match instead of the subject
	#if !self.instance_methods.include? "extract!"
	#end
	def self.ensure_slashes(aString,aLeading,aTrailing)
		if (aLeading)
			aString = ensure_prefix(aString,'/')
		else
			aString = aString.bite('/')
		end
		if (aTrailing)
			aString = ensure_suffix(aString,'/')
		else
			aString = aString.chomp('/') unless aString=='/' && aLeading
		end
		aString
	end

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
designshell-0.0.8 lib/buzzcore_mods.rb
designshell-0.0.7 lib/buzzcore_mods.rb
designshell-0.0.6 lib/buzzcore_mods.rb
designshell-0.0.5 lib/buzzcore_mods.rb
designshell-0.0.4 lib/buzzcore_mods.rb
designshell-0.0.3 lib/buzzcore_mods.rb
designshell-0.0.2 lib/buzzcore_mods.rb
designshell-0.0.1 lib/buzzcore_mods.rb