Sha256: 7066835ce090186e6e45790ef361b318921f6756918ab36545bbd61c741b6b45

Contents?: true

Size: 317 Bytes

Versions: 1

Compression:

Stored size: 317 Bytes

Contents

# frozen_string_literal: true

module Phlex
	module Turbo
		class Stream < Phlex::HTML
			register_element :turbo_stream

			def initialize(action:, target:)
				@action = action
				@target = target
			end

			def template(&content)
				turbo_stream(action: @action, target: @target, &content)
			end
		end
	end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
phlex-0.5.0 lib/phlex/turbo/stream.rb