Class Module
In: maveric/extensions.rb
Parent: Object

Methods

Public Class methods

::nodoc::

[Source]

    # File maveric/extensions.rb, line 10
10:   def self.nesting_path_to_constant path
11:     dig=proc{|c,n| c.const_get(n)}
12:     path.gsub(/_([a-z])/){$1.upcase}.split('/')
13:   end

Public Instance methods

Build a string akin to the absolute path of the nesting structure.

[Source]

   # File maveric/extensions.rb, line 3
3:   def nesting_path 
4:     ('::'+self.to_s). # '::' prepended for absolute path semantic
5:       gsub(/([a-z])([A-Z])/, '\1_\2').
6:       gsub(/(::)+/, '/').
7:       downcase
8:   end

[Validate]