Class: GfreshPoint::RequestObjects::RequestObject
- Inherits:
-
Object
- Object
- GfreshPoint::RequestObjects::RequestObject
show all
- Defined in:
- lib/gfresh_point/request_objects/request_object.rb
Instance Method Summary
collapse
Instance Method Details
#add_error(param, message) ⇒ Object
4
5
6
|
# File 'lib/gfresh_point/request_objects/request_object.rb', line 4
def add_error(param, message)
errors << {'param': param, message: message}
end
|
#errors ⇒ Object
16
17
18
|
# File 'lib/gfresh_point/request_objects/request_object.rb', line 16
def errors
@errors ||= []
end
|
#has_errors ⇒ Object
8
9
10
|
# File 'lib/gfresh_point/request_objects/request_object.rb', line 8
def has_errors
errors.count > 0
end
|
#success? ⇒ Boolean
12
13
14
|
# File 'lib/gfresh_point/request_objects/request_object.rb', line 12
def success?
!has_errors
end
|