Make code compatible with Ruby 2.7
Not including specs etc.
This commit is contained in:
@@ -149,7 +149,9 @@ module Nostr
|
||||
#
|
||||
# @return [Array<String>] The event's updated list of tags
|
||||
#
|
||||
def add_event_reference(event_id) = tags.push(['e', event_id])
|
||||
def add_event_reference(event_id)
|
||||
tags.push(['e', event_id])
|
||||
end
|
||||
|
||||
# Adds a reference to a pubkey as a 'p' tag
|
||||
#
|
||||
@@ -163,7 +165,9 @@ module Nostr
|
||||
#
|
||||
# @return [Array<String>] The event's updated list of tags
|
||||
#
|
||||
def add_pubkey_reference(pubkey) = tags.push(['p', pubkey.to_s])
|
||||
def add_pubkey_reference(pubkey)
|
||||
tags.push(['p', pubkey.to_s])
|
||||
end
|
||||
|
||||
# Signs an event with the user's private key
|
||||
#
|
||||
@@ -212,13 +216,13 @@ module Nostr
|
||||
#
|
||||
def to_h
|
||||
{
|
||||
id:,
|
||||
pubkey:,
|
||||
created_at:,
|
||||
kind:,
|
||||
tags:,
|
||||
content:,
|
||||
sig:
|
||||
id: id,
|
||||
pubkey: pubkey,
|
||||
created_at: created_at,
|
||||
kind: kind,
|
||||
tags: tags,
|
||||
content: content,
|
||||
sig: sig
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user