Sha256: 8c54aa3fd7b4c5fa02ab2dc850ddb12685fb100847b31a705c03ed05d4201065
Contents?: true
Size: 721 Bytes
Versions: 17
Compression:
Stored size: 721 Bytes
Contents
module Librarian # PRIVATE # # Adapters must not rely on these methods since they will change. # # Adapters requiring similar methods ought to re-implement them. module Helpers extend self # [active_support/core_ext/string/strip] def strip_heredoc(string) indent = string.scan(/^[ \t]*(?=\S)/).min indent = indent.respond_to?(:size) ? indent.size : 0 string.gsub(/^[ \t]{#{indent}}/, '') end # [active_support/inflector/methods] def camel_cased_to_dasherized(camel_cased_word) word = camel_cased_word.to_s.dup word.gsub!(/([A-Z\d]+)([A-Z][a-z])/,'\1-\2') word.gsub!(/([a-z\d])([A-Z])/,'\1-\2') word.downcase! word end end end
Version data entries
17 entries across 17 versions & 2 rubygems