Class: Handlebars::Helpers::StringFormatting::Snake
- Inherits:
-
BaseHelper
- Object
- BaseHelper
- Handlebars::Helpers::StringFormatting::Snake
- Defined in:
- lib/handlebars/helpers/string_formatting/snake.rb
Overview
snake case the characters in the given ‘string’.
Instance Method Summary collapse
-
#parse(value) ⇒ String
Parse will snake case the characters in the given ‘string’.
Methods inherited from BaseHelper
#handlebars_helper, #parse_json, #struct_to_hash, #tokenizer, #wrapper
Instance Method Details
#parse(value) ⇒ String
Parse will snake case the characters in the given ‘string’.
27 28 29 |
# File 'lib/handlebars/helpers/string_formatting/snake.rb', line 27 def parse(value) tokenizer.parse(value, separator: '_', forced_separator: true) end |