Sha256: 4e106b261ddd407a6b940c7c79fc6356e8fa43515be67932a5f3aa1c5b8e597f

Contents?: true

Size: 353 Bytes

Versions: 6

Compression:

Stored size: 353 Bytes

Contents

# frozen_string_literal: true

module Phlex
	module Turbo
		class Stream < Phlex::HTML
			include Experimental

			register_element :turbo_stream

			def initialize(action:, **attributes)
				@action = action
				@attributes = attributes
			end

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

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
phlex-1.0.1 lib/phlex/turbo/stream.rb
phlex-1.1.1 lib/phlex/turbo/stream.rb
phlex-1.1.0 lib/phlex/turbo/stream.rb
phlex-1.0.0 lib/phlex/turbo/stream.rb
phlex-1.0.0.rc2 lib/phlex/turbo/stream.rb
phlex-1.0.0.rc1 lib/phlex/turbo/stream.rb