Class: Processor::Subroutine::Name
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Processor::Subroutine::Name
- Defined in:
- lib/processor/subroutine/name.rb
Instance Method Summary collapse
Instance Method Details
#name ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/processor/subroutine/name.rb', line 6 def name return super if __getobj__.respond_to? :name # underscore a class name @name ||= real_object.class.name.to_s. gsub(/::/, '_'). gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2'). gsub(/([a-z\d])([A-Z])/,'\1_\2'). downcase end |