20 lines
220 B
Ruby
20 lines
220 B
Ruby
|
require_dependency 'has_errors'
|
||
|
|
||
|
class PostActionResult
|
||
|
include HasErrors
|
||
|
|
||
|
attr_accessor :success
|
||
|
|
||
|
def initialize
|
||
|
@success = false
|
||
|
end
|
||
|
|
||
|
def success?
|
||
|
@success
|
||
|
end
|
||
|
|
||
|
def failed?
|
||
|
!success
|
||
|
end
|
||
|
end
|