Sha256: e566591acd46024c89e6209c2e929748f81efc49443ac8d33b687cc2cccff970

Contents?: true

Size: 227 Bytes

Versions: 4

Compression:

Stored size: 227 Bytes

Contents

# frozen_string_literal: true

module CableReady
  module Compoundable
    def compound(keys)
      keys.map { |key|
        key.class < ActiveRecord::Base ? key.to_global_id.to_s : key.to_s
      }.join(":")
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
cable_ready-5.0.0.pre3 lib/cable_ready/compoundable.rb
cable_ready-5.0.0.pre2 lib/cable_ready/compoundable.rb
cable_ready-5.0.0.pre1 lib/cable_ready/compoundable.rb
cable_ready-5.0.0.pre0 lib/cable_ready/compoundable.rb