Sha256: 98399fea290a465b8d8cfaae5ed31ce763a356c77070c01adfd273ba41cf99b8
Contents?: true
Size: 379 Bytes
Versions: 12
Compression:
Stored size: 379 Bytes
Contents
# frozen_string_literal: true # Mimics the module by the same name from Rails, to add convenience methods module CoreExtensions module String # Adds convenience methods module Inflections def snake_case downcase.tr(' ', '_').gsub(/[^a-z_0-9]/, '') end def camel_case split('_').collect(&:capitalize).join end end end end
Version data entries
12 entries across 12 versions & 1 rubygems