Method: Consoler::Application#_normalize

Defined in:
lib/consoler/application.rb

#_normalize(name) ⇒ String (private)

Normalize a name to be used as a variable name

Parameters:

  • Name

Returns:

  • Normalized name



252
253
254
255
256
257
258
259
260
# File 'lib/consoler/application.rb', line 252

def _normalize(name)
  # maybe do something more, maybe not.. ruby does allow for
  # some weird stuff to be used as a variable name. the user
  # should use some common sense. and, other things might
  # also be an syntax error, like starting with a number.
  # this normalization is more of a comvenience than anything
  # else
  name.tr('-', '_')
end