Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/stone/core_ext/string.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#/(o) ⇒ Object



2
3
4
# File 'lib/stone/core_ext/string.rb', line 2

def /(o)
  File.join(self, o.to_s)
end

#make_keyObject



5
6
7
# File 'lib/stone/core_ext/string.rb', line 5

def make_key
  self.downcase.to_sym
end

#titlecaseObject

From Ruby Facets



9
10
11
# File 'lib/stone/core_ext/string.rb', line 9

def titlecase
  gsub(/\b\w/){$&.upcase}
end