Skip to content

Commit 7eb82b5

Browse files
committed
remove to_json from connection
1 parent e9e3fb6 commit 7eb82b5

File tree

2 files changed

+0
-18
lines changed

2 files changed

+0
-18
lines changed

lib/async/container/supervisor/connection.rb

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
# Released under the MIT License.
44
# Copyright, 2025, by Samuel Williams.
55

6-
require "json"
76
require "async"
87
require_relative "message_wrapper"
98

@@ -40,13 +39,6 @@ def as_json(...)
4039
@message
4140
end
4241

43-
# Convert the call to a JSON string.
44-
#
45-
# @returns [String] The JSON representation.
46-
def to_json(...)
47-
as_json.to_json(...)
48-
end
49-
5042
# @attribute [Connection] The connection that initiated the call.
5143
attr :connection
5244

test/async/container/connection.rb

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -88,16 +88,6 @@ def write_message(message)
8888
with subject::Call do
8989
let(:test_call) {Async::Container::Supervisor::Connection::Call.new(connection, 1, {do: :test, data: "value"})}
9090

91-
it "can serialize call to JSON" do
92-
json = test_call.to_json
93-
parsed = JSON.parse(json)
94-
95-
expect(parsed).to have_keys(
96-
"do" => be == "test",
97-
"data" => be == "value"
98-
)
99-
end
100-
10191
it "can get call message via as_json" do
10292
expect(test_call.as_json).to have_keys(
10393
do: be == :test,

0 commit comments

Comments
 (0)