Puppet Function: bin_to_hex
- Defined in:
- lib/puppet/functions/bin_to_hex.rb
- Function type:
- Ruby 4.x API
Overview
1 2 3 4 5 6 7 8 9 10 |
# File 'lib/puppet/functions/bin_to_hex.rb', line 1 Puppet::Functions.create_function(:bin_to_hex) do dispatch :bin_to_hex do param 'String', :input_str return_type 'String' end def bin_to_hex(input_str) input_str.each_byte.map { |b| b.to_s(16) }.join end end |