Sha256: 38a15b397bda44640c41160e91d992588555000a813b3ef4084742b39a21c392

Contents?: true

Size: 389 Bytes

Versions: 1

Compression:

Stored size: 389 Bytes

Contents

module ActionMerge
	class Peer
		attr_accessor :id, :isEphemeral, :storageId, :model
	
		def initialize(id, isEphemeral: nil, storageId: nil, model: nil)
			@id = id
			@isEphemeral = isEphemeral
			@storageId = storageId
			@model = model
		end
		
		def metadata
			{
				isEphemeral:,
				storageId:
			}
		end
		
		def to_gid_param
			[[@model.class.name, @model.id], id]
		end
	end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
action_merge-0.1.0 app/models/action_merge/peer.rb