Module: Gemmy::Patches::SymbolPatch::InstanceMethods::Variablize
- Defined in:
- lib/gemmy/patches/symbol_patch.rb
Instance Method Summary collapse
-
#variablize ⇒ Object
facets take a symbol and make it fine for an instance variable name.
Instance Method Details
#variablize ⇒ Object
facets take a symbol and make it fine for an instance variable name
23 24 25 26 |
# File 'lib/gemmy/patches/symbol_patch.rb', line 23 def variablize name = to_s.gsub(/\W/, '_') "@#{name}".to_sym end |