Skip to content

Commit

Permalink
Fix ameba findings
Browse files Browse the repository at this point in the history
  • Loading branch information
treagod committed Aug 27, 2024
1 parent 6ba3bf1 commit 6482d9f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions spec/marten-turbo/turbo_stream_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ describe MartenTurbo::TurboStream do
end

it "accepts a block to initialize the stream" do
stream = MartenTurbo::TurboStream.new do |stream|
stream.append("messages", "<div>Message 1</div>")
stream = MartenTurbo::TurboStream.new do |turbo_stream|
turbo_stream.append("messages", "<div>Message 1</div>")
end

stream.to_s.should contain "<turbo-stream action=\"append\" target=\"messages\">"
Expand Down
2 changes: 1 addition & 1 deletion src/marten_turbo/turbo_stream.cr
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module MartenTurbo
@streams = [] of String
end

def initialize
def initialize(&)
@streams = [] of String
yield self
end
Expand Down

0 comments on commit 6482d9f

Please sign in to comment.