Class: String

Inherits:
Object show all
Defined in:
lib/ruby_ext/fixes.rb,
lib/rspec_ext.rb,
lib/ruby_ext/core/micelaneous.rb

Overview

clone doesn’t unfreeze String

Instance Method Summary collapse

Instance Method Details

#cloneObject



3
4
5
# File 'lib/ruby_ext/fixes.rb', line 3

def clone
  "" + self
end

#dirnameObject



117
118
119
# File 'lib/rspec_ext.rb', line 117

def dirname
  File.expand_path(File.dirname(self))
end

#parent_dirnameObject



123
124
125
# File 'lib/rspec_ext.rb', line 123

def parent_dirname
  File.expand_path(self + "/..")
end

#string_or_symbol?Boolean

Returns:

  • (Boolean)


9
# File 'lib/ruby_ext/core/micelaneous.rb', line 9

def string_or_symbol?; true end