Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/bewildr/ext/extensions.rb
Overview
removes need for active support
Instance Method Summary collapse
-
#bewildr_classify ⇒ Object
Kinda like classify from active support, but does only what’s needed by bewildr.
-
#bewildr_demodulize ⇒ Object
directly stolen from active support - takes the module bit off a class name.
Instance Method Details
#bewildr_classify ⇒ Object
Kinda like classify from active support, but does only what’s needed by bewildr
20 21 22 |
# File 'lib/bewildr/ext/extensions.rb', line 20 def bewildr_classify self.split("_").collect {|word| "#{word[0].upcase}#{word[1..-1]}"}.join end |
#bewildr_demodulize ⇒ Object
directly stolen from active support - takes the module bit off a class name
15 16 17 |
# File 'lib/bewildr/ext/extensions.rb', line 15 def bewildr_demodulize gsub(/^.*::/, '') end |