Using double splat operator (#5859)
This commit is contained in:
parent
42bcbd36b7
commit
b21db9bbde
25 changed files with 32 additions and 32 deletions
|
@ -3,7 +3,7 @@
|
|||
class ActivityPub::Activity
|
||||
include JsonLdHelper
|
||||
|
||||
def initialize(json, account, options = {})
|
||||
def initialize(json, account, **options)
|
||||
@json = json
|
||||
@account = account
|
||||
@object = @json['object']
|
||||
|
@ -15,7 +15,7 @@ class ActivityPub::Activity
|
|||
end
|
||||
|
||||
class << self
|
||||
def factory(json, account, options = {})
|
||||
def factory(json, account, **options)
|
||||
@json = json
|
||||
klass&.new(json, account, options)
|
||||
end
|
||||
|
|
|
@ -32,7 +32,7 @@ module Extractor
|
|||
possible_entries
|
||||
end
|
||||
|
||||
def extract_hashtags_with_indices(text, _options = {})
|
||||
def extract_hashtags_with_indices(text, **)
|
||||
return [] unless text =~ /#/
|
||||
|
||||
tags = []
|
||||
|
|
|
@ -9,7 +9,7 @@ class Formatter
|
|||
|
||||
include ActionView::Helpers::TextHelper
|
||||
|
||||
def format(status, options = {})
|
||||
def format(status, **options)
|
||||
if status.reblog?
|
||||
prepend_reblog = status.reblog.account.acct
|
||||
status = status.proper
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class OStatus::Activity::Base
|
||||
def initialize(xml, account = nil, options = {})
|
||||
def initialize(xml, account = nil, **options)
|
||||
@xml = xml
|
||||
@account = account
|
||||
@options = options
|
||||
|
|
|
@ -319,7 +319,7 @@ class OStatus::AtomSerializer
|
|||
|
||||
private
|
||||
|
||||
def append_element(parent, name, content = nil, attributes = {})
|
||||
def append_element(parent, name, content = nil, **attributes)
|
||||
element = Ox::Element.new(name)
|
||||
attributes.each { |k, v| element[k] = sanitize_str(v) }
|
||||
element << sanitize_str(content) unless content.nil?
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
class ProviderDiscovery < OEmbed::ProviderDiscovery
|
||||
class << self
|
||||
def discover_provider(url, options = {})
|
||||
def discover_provider(url, **options)
|
||||
res = Request.new(:get, url).perform
|
||||
format = options[:format]
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ class Request
|
|||
|
||||
include RoutingHelper
|
||||
|
||||
def initialize(verb, url, options = {})
|
||||
def initialize(verb, url, **options)
|
||||
@verb = verb
|
||||
@url = Addressable::URI.parse(url).normalize
|
||||
@options = options
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue