Skip to content

Commit 5dca8a8

Browse files
committed
Rename Defaultable -> Defaulton.
1 parent 182bff8 commit 5dca8a8

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

lib/async/http/protocol/defaultable.rb renamed to lib/async/http/protocol/defaulton.rb

+4-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
module Async
77
module HTTP
88
module Protocol
9-
module Defaultable
9+
# This module provides a default instance of the protocol, which can be used to create clients and servers. The name is a play on "Default" + "Singleton".
10+
module Defaulton
1011
def self.extended(base)
1112
base.const_set(:DEFAULT, base.new)
1213
end
@@ -31,6 +32,8 @@ def names
3132
default.names
3233
end
3334
end
35+
36+
private_constant :Defaulton
3437
end
3538
end
3639
end

lib/async/http/protocol/http.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Copyright, 2024, by Thomas Morgan.
55
# Copyright, 2024, by Samuel Williams.
66

7-
require_relative "defaultable"
7+
require_relative "defaulton"
88

99
require_relative "http1"
1010
require_relative "http2"
@@ -71,7 +71,7 @@ def server(peer, **options)
7171
return protocol.server(stream, **options)
7272
end
7373

74-
extend Defaultable
74+
extend Defaulton
7575
end
7676
end
7777
end

lib/async/http/protocol/https.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Copyright, 2018-2024, by Samuel Williams.
55
# Copyright, 2019, by Brian Morearty.
66

7-
require_relative "defaultable"
7+
require_relative "defaulton"
88

99
require_relative "http10"
1010
require_relative "http11"
@@ -79,7 +79,7 @@ def names
7979
@handlers.keys.compact
8080
end
8181

82-
extend Defaultable
82+
extend Defaulton
8383
end
8484
end
8585
end

0 commit comments

Comments
 (0)