Corrected with rubocop cop 'Style/TrivialAccessors'.
This commit is contained in:
parent
21a7a87098
commit
dd4b2b88d1
1 changed files with 8 additions and 15 deletions
|
@ -386,6 +386,13 @@ returns
|
||||||
end
|
end
|
||||||
|
|
||||||
class Result
|
class Result
|
||||||
|
|
||||||
|
attr_reader :error
|
||||||
|
attr_reader :body
|
||||||
|
attr_reader :data
|
||||||
|
attr_reader :code
|
||||||
|
attr_reader :content_type
|
||||||
|
|
||||||
def initialize(options)
|
def initialize(options)
|
||||||
@success = options[:success]
|
@success = options[:success]
|
||||||
@body = options[:body]
|
@body = options[:body]
|
||||||
|
@ -394,23 +401,9 @@ returns
|
||||||
@content_type = options[:content_type]
|
@content_type = options[:content_type]
|
||||||
@error = options[:error]
|
@error = options[:error]
|
||||||
end
|
end
|
||||||
def error
|
|
||||||
@error
|
|
||||||
end
|
|
||||||
def success?
|
def success?
|
||||||
@success
|
@success
|
||||||
end
|
end
|
||||||
def body
|
|
||||||
@body
|
|
||||||
end
|
|
||||||
def data
|
|
||||||
@data
|
|
||||||
end
|
|
||||||
def code
|
|
||||||
@code
|
|
||||||
end
|
|
||||||
def content_type
|
|
||||||
@content_type
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue