Sha256: 393ec96de94a2ccef736fc2f4b5ee9e1ba9408c0dd73d4305b21dd3fa245ec87
Contents?: true
Size: 403 Bytes
Versions: 6
Compression:
Stored size: 403 Bytes
Contents
# encoding: utf-8 # frozen_string_literal: true # # Convert a simple DTMF string from "1 star 2" to "dtmf-1 dtmf-star dtmf-2". # # @param [Array] sequence A set of DTMF keys, such as `%w(1 star 2)`. # # @return [String] A string with "dtmf-" prefixed for each DTMF element. # Example: "dtmf-1 dtmf-star dtmf-2". # def dtmf_seq(sequence) sequence.map { |d| "dtmf-#{d}" }.join ' ' end
Version data entries
6 entries across 6 versions & 1 rubygems