Skip to content

Commit

Permalink
Increase yard coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
renatolond committed Jan 16, 2020
1 parent f40c5c7 commit f8e46fe
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/twitter/rest/request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ def symbolize_keys!(object)
object
end

# Returns an HTTP client, using configuration set up in the client
#
# @api private
# @return [HTTP::Client, HTTP]
def http_client
client = @client.proxy ? HTTP.via(*proxy) : HTTP
Expand All @@ -125,6 +128,7 @@ def http_client

# Return proxy values as a compacted array
#
# @api private
# @return [Array]
def proxy
@client.proxy.values_at(:host, :port, :username, :password).compact
Expand Down
4 changes: 4 additions & 0 deletions lib/twitter/rest/utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ module Utils
# Take a URI string or Twitter::Identity object and return its ID
#
# @param object [Integer, String, URI, Twitter::Identity] An ID, URI, or object.
# @api private
# @return [Integer]
def extract_id(object)
case object
Expand All @@ -31,18 +32,21 @@ def extract_id(object)
end
end

# @api private
# @param path [String]
# @param options [Hash]
def perform_get(path, options = {})
perform_request(:get, path, options)
end

# @api private
# @param path [String]
# @param options [Hash]
def perform_post(path, options = {})
perform_request(:post, path, options)
end

# @api private
# @param request_method [Symbol]
# @param path [String]
# @param options [Hash]
Expand Down

0 comments on commit f8e46fe

Please sign in to comment.