Sha256: 5922cae1c330b853d982899e3923bdf2277ea68b2e030765961f2ec157574434

Contents?: true

Size: 260 Bytes

Versions: 4

Compression:

Stored size: 260 Bytes

Contents

module ActionTexter
  class Helper
    def self.underscore(camel_cased_word)
      camel_cased_word.to_s.gsub(/::/, '/')
        .gsub(/([A-Z]+)([A-Z][a-z])/, '\1_\2')
        .gsub(/([a-z\d])([A-Z])/, '\1_\2')
        .tr('-', '_').downcase
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
action-texter-0.2.1.pre lib/action_texter/helper.rb
action-texter-0.2.0.pre lib/action_texter/helper.rb
action-texter-0.1.2.ALPHA lib/action_texter/helper.rb
action-texter-0.0.1 lib/action_texter/helper.rb