Class: DefraRuby::Area::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/defra_ruby/area/response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response_exe) ⇒ Response

Returns a new instance of Response.



8
9
10
11
12
13
14
# File 'lib/defra_ruby/area/response.rb', line 8

def initialize(response_exe)
  @success = true
  @areas = []
  @error = nil

  capture_response(response_exe)
end

Instance Attribute Details

#areasObject (readonly)

Returns the value of attribute areas.



6
7
8
# File 'lib/defra_ruby/area/response.rb', line 6

def areas
  @areas
end

#errorObject (readonly)

Returns the value of attribute error.



6
7
8
# File 'lib/defra_ruby/area/response.rb', line 6

def error
  @error
end

Instance Method Details

#successful?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/defra_ruby/area/response.rb', line 16

def successful?
  success
end