mirror of
https://github.com/discourse/discourse.git
synced 2024-11-30 18:05:08 +08:00
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
|