Method: Web::SimpleDispatcher.template_from_class
- Defined in:
- lib/web/simpledispatcher.rb
.template_from_class(aClass) ⇒ Object
122 123 124 125 126 127 128 129 130 131 132 133 |
# File 'lib/web/simpledispatcher.rb', line 122 def template_from_class aClass first = true aClass.name.gsub(/([A-Z])/) do |m| value = m.downcase if first first = false value else "_" + value end end end |