lib/anyway/ext/class.rb in anyway_config-0.5.1.rc1 vs lib/anyway/ext/class.rb in anyway_config-0.5.1

- old
+ new

@@ -1,15 +1,13 @@ -# frozen_string_literal: true - module Anyway module Ext # Extend String through refinements module Class refine ::Class do def underscore_name return unless name word = name[/^(\w+)/] - word.gsub!(/([A-Z\d]+)([A-Z][a-z])/, '\1_\2') + word.gsub!(/([A-Z\d]+)([A-Z][a-z])/,'\1_\2') word.downcase! word end end end