2019-05-03 06:17:27 +08:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2019-01-04 01:03:01 +08:00
|
|
|
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
|