class ActiveSupport::NumberHelper::NumberToDelimitedConverter
Experimental RBS support (using type sampling data from the type_fusion
project).
# sig/active_support/number_helper/number_to_delimited_converter.rbs class ActiveSupport::NumberHelper::NumberToDelimitedConverter < ActiveSupport::NumberHelper::NumberConverter def convert: (Integer number, Hash options) -> String def delimiter_pattern: () -> Regexp def parts: () -> Array[String] end
:nodoc:
def convert
Experimental RBS support (using type sampling data from the type_fusion
project).
def convert: (Integer number, options) -> String
This signature was generated using 3 samples from 1 application.
def convert parts.join(options[:separator]) end
def delimiter_pattern
Experimental RBS support (using type sampling data from the type_fusion
project).
def delimiter_pattern: () -> Regexp
This signature was generated using 3 samples from 1 application.
def delimiter_pattern options.fetch(:delimiter_pattern, DEFAULT_DELIMITER_REGEX) end
def parts
Experimental RBS support (using type sampling data from the type_fusion
project).
def parts: () ->
This signature was generated using 3 samples from 1 application.
def parts left, right = number.to_s.split(".") left.gsub!(delimiter_pattern) do |digit_to_delimit| "#{digit_to_delimit}#{options[:delimiter]}" end [left, right].compact end