Class: ReeString::Demodulize

Inherits:
Object
  • Object
show all
Includes:
Ree::FnDSL
Defined in:
lib/ree_lib/packages/ree_string/package/ree_string/functions/demodulize.rb

Instance Method Summary collapse

Instance Method Details

#call(path) ⇒ Object


19
20
21
22
23
24
25
26
27
# File 'lib/ree_lib/packages/ree_string/package/ree_string/functions/demodulize.rb', line 19

def call(path)
  path = path.to_s

  if i = path.rindex("::")
    path[(i + 2)..-1]
  else
    path
  end
end