Sha256: 3399aaa43042eea56be1c4a179ddf99c8da2f264930748577fab838cbe11f9f1

Contents?: true

Size: 86 Bytes

Versions: 18

Compression:

Stored size: 86 Bytes

Contents

class String
  def to_method
    self.gsub(/\W+/, "_").downcase.to_sym
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
mohawk-1.0 lib/mohawk/core_ext/string.rb
mohawk-0.4.4 lib/mohawk/core_ext/string.rb
mohawk-0.4.3 lib/mohawk/core_ext/string.rb
mohawk-0.4.2 lib/mohawk/core_ext/string.rb
mohawk-0.4.1 lib/mohawk/core_ext/string.rb
mohawk-0.4 lib/mohawk/core_ext/string.rb
mohawk-0.3 lib/mohawk/core_ext/string.rb
mohawk-0.2.1 lib/mohawk/core_ext/string.rb
mohawk-0.2 lib/mohawk/core_ext/string.rb
mohawk-0.1.4 lib/mohawk/core_ext/string.rb
mohawk-0.1.0 lib/mohawk/core_ext/string.rb
mohawk-0.0.9 lib/mohawk/core_ext/string.rb
mohawk-0.0.8 lib/mohawk/core_ext/string.rb
mohawk-0.0.7 lib/mohawk/core_ext/string.rb
mohawk-0.0.6 lib/mohawk/core_ext/string.rb
mohawk-0.0.5 lib/mohawk/core_ext/string.rb
mohawk-0.0.4 lib/mohawk/core_ext/string.rb
mohawk-0.0.3 lib/mohawk/core_ext/string.rb