Sha256: 12c8346de54b3558998dad319d370dbccd572270755a6a13f2ed57f384ad2587
Contents?: true
Size: 502 Bytes
Versions: 13
Compression:
Stored size: 502 Bytes
Contents
# encoding: UTF-8 module NameHelper def create_nice_file_name(file_content) class_name = file_content.match(/#{@app_structure.vendor}::[A-Z_]+::[a-zA-Z]+/).to_s.split('::').last class_name.gsub!(/[A-Z]+/) do |capital_letters| if capital_letters.size > 1 && class_name[-capital_letters.size..-1] != capital_letters "_#{capital_letters[0..-2].downcase}_#{capital_letters[-1].downcase}" else "_#{capital_letters.downcase}" end end class_name end end
Version data entries
13 entries across 13 versions & 1 rubygems