Class: Symbol

Inherits:
Object
  • Object
show all
Defined in:
lib/core_ext/symbol_extension.rb

Overview

Extend symbol with helpers specificic to this gem.

Instance Method Summary collapse

Instance Method Details

#mm_camelizeObject

Convert snake case to camel case while honoring acronyms.



11
12
13
# File 'lib/core_ext/symbol_extension.rb', line 11

def mm_camelize
  to_s.mm_camelize.to_sym
end

#mm_pascalizeObject

Convert snake case to Pascal case while honoring acronyms.



16
17
18
# File 'lib/core_ext/symbol_extension.rb', line 16

def mm_pascalize
  to_s.mm_pascalize.to_sym
end

#mm_pluralizeObject

Simplistic pluralization for M&M types



21
22
23
# File 'lib/core_ext/symbol_extension.rb', line 21

def mm_pluralize
  to_s.mm_pluralize.to_sym
end

#mm_underscoreObject

Underscore functionality to match conversion from M&M values.



6
7
8
# File 'lib/core_ext/symbol_extension.rb', line 6

def mm_underscore
  to_s.mm_underscore.to_sym
end