Module: Sevgi::Function::String
- Included in:
- Sevgi::Function
- Defined in:
- lib/sevgi/function/string.rb
Overview
String methods promoted to Sevgi::F. This module organizes the facade implementation; it is not a consumer mixin contract.
Instance Method Summary collapse
-
#demodulize(path) ⇒ String
Returns the final constant name segment from a module path.
Instance Method Details
#demodulize(path) ⇒ String
Returns the final constant name segment from a module path.
11 12 13 14 15 16 17 18 |
# File 'lib/sevgi/function/string.rb', line 11 def demodulize(path) path = path.to_s if (i = path.rindex("::")) path[(i + 2), path.length] else path end end |