class DefraRuby::Area::Response
Attributes
areas[R]
error[R]
success[R]
Public Class Methods
new(response_exe)
click to toggle source
# File lib/defra_ruby/area/response.rb, line 8 def initialize(response_exe) @success = true @areas = [] @error = nil capture_response(response_exe) end
Public Instance Methods
successful?()
click to toggle source
# File lib/defra_ruby/area/response.rb, line 16 def successful? success end
Private Instance Methods
capture_response(response_exe)
click to toggle source
# File lib/defra_ruby/area/response.rb, line 24 def capture_response(response_exe) @areas = response_exe.call[:areas] rescue StandardError => e @error = e @success = false end