From dd4b2b88d1b683d27c0e79296a781ff5d19fc583 Mon Sep 17 00:00:00 2001 From: Thorsten Eckel Date: Thu, 30 Apr 2015 20:02:52 +0200 Subject: [PATCH] Corrected with rubocop cop 'Style/TrivialAccessors'. --- lib/user_agent.rb | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/lib/user_agent.rb b/lib/user_agent.rb index 6f3b54b90..3c16769eb 100644 --- a/lib/user_agent.rb +++ b/lib/user_agent.rb @@ -386,6 +386,13 @@ returns end class Result + + attr_reader :error + attr_reader :body + attr_reader :data + attr_reader :code + attr_reader :content_type + def initialize(options) @success = options[:success] @body = options[:body] @@ -394,23 +401,9 @@ returns @content_type = options[:content_type] @error = options[:error] end - def error - @error - end + def success? @success end - def body - @body - end - def data - @data - end - def code - @code - end - def content_type - @content_type - end end end