Skip to content

Commit

Permalink
Fixed Naming/BlockForwarding
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbrodie committed Apr 29, 2024
1 parent 30d1912 commit f007500
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions lib/jira/has_many_proxy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def all
end

# Delegate any missing methods to the collection that this proxy wraps
def method_missing(method_name, *args, &block)
collection.send(method_name, *args, &block)
def method_missing(method_name, *args, &)
collection.send(method_name, *args, &)
end
end
4 changes: 2 additions & 2 deletions lib/jira/oauth_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ def init_oauth_consumer(_options)

# Returns the current request token if it is set, else it creates
# and sets a new token.
def request_token(options = {}, *arguments, &block)
@request_token ||= get_request_token(options, *arguments, &block)
def request_token(options = {}, *arguments, &)
@request_token ||= get_request_token(options, *arguments, &)
end

# Sets the request token from a given token and secret.
Expand Down
4 changes: 2 additions & 2 deletions lib/jira/resource/attachment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ def self.meta(client)
# @param [Hash] headers Any additional headers to call Jira.
# @yield |file|
# @yieldparam [IO] file The IO object streaming the download.
def download_file(headers = {}, &block)
def download_file(headers = {}, &)
default_headers = client.options[:default_headers]
URI.open(content, default_headers.merge(headers), &block)
URI.open(content, default_headers.merge(headers), &)
end

# Downloads the file contents as a string object.
Expand Down
4 changes: 2 additions & 2 deletions lib/jira/resource/field.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,15 @@ def respond_to?(method_name, _include_all = false)
end
end

def method_missing(method_name, *args, &block)
def method_missing(method_name, *args, &)
if attrs.key?(method_name.to_s)
attrs[method_name.to_s]
else
official_name = client.Field.name_to_id(method_name)
if attrs.key?(official_name)
attrs[official_name]
else
super(method_name, *args, &block)
super(method_name, *args, &)
end
end
end
Expand Down
6 changes: 3 additions & 3 deletions lib/jira/resource/issue.rb
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def respond_to?(method_name, _include_all = false)
end
end

def method_missing(method_name, *args, &block)
def method_missing(method_name, *args, &)
if attrs.key?('fields')
if attrs['fields'].key?(method_name.to_s)
attrs['fields'][method_name.to_s]
Expand All @@ -116,11 +116,11 @@ def method_missing(method_name, *args, &block)
if attrs['fields'].key?(official_name)
attrs['fields'][official_name]
else
super(method_name, *args, &block)
super(method_name, *args, &)
end
end
else
super(method_name, *args, &block)
super(method_name, *args, &)
end
end
end
Expand Down

0 comments on commit f007500

Please sign in to comment.