Class: Nostr::Relay
- Inherits:
-
Object
- Object
- Nostr::Relay
- Defined in:
- lib/nostr/relay.rb
Overview
Relays expose a websocket endpoint to which clients can connect.
Instance Attribute Summary collapse
-
#name ⇒ String
readonly
The name of the relay.
-
#url ⇒ String
readonly
The websocket URL of the relay.
Instance Method Summary collapse
-
#initialize(url:, name:) ⇒ String
constructor
Instantiates a new Relay.
Constructor Details
#initialize(url:, name:) ⇒ String
Instantiates a new Relay
38 39 40 41 |
# File 'lib/nostr/relay.rb', line 38 def initialize(url:, name:) @url = url @name = name end |
Instance Attribute Details
#name ⇒ String (readonly)
The name of the relay
26 27 28 |
# File 'lib/nostr/relay.rb', line 26 def name @name end |
#url ⇒ String (readonly)
The websocket URL of the relay
15 16 17 |
# File 'lib/nostr/relay.rb', line 15 def url @url end |