Sha256: cd2e2f9ce4d3c2b978e4da68d640f8a7b11a7973d0e94a8c8b3627e4f946bc8a
Contents?: true
Size: 585 Bytes
Versions: 5
Compression:
Stored size: 585 Bytes
Contents
# frozen_string_literal: true module LiveKit module Utils # Utility function to convert WebSocket URLs to HTTP URLs def to_http_url(url) if url.start_with?("ws") # Replace 'ws' prefix with 'http' url.sub(/^ws/, "http") else url end end module_function :to_http_url module StringifyKeysRefinement refine Hash do def stringify_keys transform_keys(&:to_s).transform_values do |value| value.is_a?(Hash) ? value.stringify_keys : value end end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems