Class: Handlebarsjs::Helpers::Inflection::Ordinal

Inherits:
BaseHelper
  • Object
show all
Defined in:
lib/handlebarsjs/helpers/inflection/ordinal.rb

Overview

Ordinal: The suffix that should be added to a number to denote the position in an ordered sequence such as 1st, 2nd, 3rd, 4th

Instance Attribute Summary

Attributes inherited from BaseHelper

#block, #cmdlet, #parameter_names, #safe

Instance Method Summary collapse

Methods inherited from BaseHelper

#initialize, register_cmdlet, #wrapper

Constructor Details

This class inherits a constructor from Handlebarsjs::BaseHelper

Instance Method Details

#to_procObject



11
12
13
# File 'lib/handlebarsjs/helpers/inflection/ordinal.rb', line 11

def to_proc
  ->(value, _opts) { wrapper(cmdlet.call(value)) }
end