Method: Handlebars::Helpers::StringFormatting::AppendIf#parse
- Defined in:
- lib/handlebars/helpers/string_formatting/append_if.rb
#parse(value, suffix, formats) ⇒ String
Parse will Append If will append suffix to value, if value is not empty
27 28 29 30 |
# File 'lib/handlebars/helpers/string_formatting/append_if.rb', line 27 def parse(value, suffix, formats) format_as = ::Helpers::StringFormatting::FormatAs.new value.present? ? "#{format_as.parse(value, formats)}#{suffix}" : '' end |