0
0
Fork 0

Improve code style

This commit is contained in:
Eugen Rochko 2016-09-29 21:28:21 +02:00
parent e4aebad35a
commit 927333f4f8
41 changed files with 126 additions and 122 deletions

View file

@ -1,6 +1,6 @@
class FetchRemoteStatusService < BaseService
def call(url)
atom_url, body = FetchAtomService.new.(url)
atom_url, body = FetchAtomService.new.call(url)
return nil if atom_url.nil?
return process_atom(atom_url, body)
@ -9,14 +9,14 @@ class FetchRemoteStatusService < BaseService
private
def process_atom(url, body)
Rails.logger.debug "Processing Atom for remote status"
Rails.logger.debug 'Processing Atom for remote status'
xml = Nokogiri::XML(body)
account = extract_author(url, xml)
return nil if account.nil?
statuses = ProcessFeedService.new.(body, account)
statuses = ProcessFeedService.new.call(body, account)
return statuses.first
end
@ -30,6 +30,6 @@ class FetchRemoteStatusService < BaseService
Rails.logger.debug "Going to webfinger #{username}@#{domain}"
return FollowRemoteAccountService.new.("#{username}@#{domain}")
return FollowRemoteAccountService.new.call("#{username}@#{domain}")
end
end