Class: Reviewable::PerformResult
- Inherits:
-
Object
- Object
- Reviewable::PerformResult
- Includes:
- ActiveModel::Serialization
- Defined in:
- lib/reviewable/perform_result.rb
Instance Attribute Summary collapse
-
#created_post ⇒ Object
Returns the value of attribute created_post.
-
#created_post_topic ⇒ Object
readonly
Returns the value of attribute created_post_topic.
-
#errors ⇒ Object
Returns the value of attribute errors.
-
#recalculate_score ⇒ Object
Returns the value of attribute recalculate_score.
-
#remove_reviewable_ids ⇒ Object
Returns the value of attribute remove_reviewable_ids.
-
#reviewable ⇒ Object
readonly
Returns the value of attribute reviewable.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#transition_to ⇒ Object
Returns the value of attribute transition_to.
-
#update_flag_stats ⇒ Object
Returns the value of attribute update_flag_stats.
Instance Method Summary collapse
-
#initialize(reviewable, status) ⇒ PerformResult
constructor
A new instance of PerformResult.
- #success? ⇒ Boolean
Constructor Details
#initialize(reviewable, status) ⇒ PerformResult
Returns a new instance of PerformResult.
17 18 19 20 21 |
# File 'lib/reviewable/perform_result.rb', line 17 def initialize(reviewable, status) @status = status @reviewable = reviewable @remove_reviewable_ids = [reviewable.id] if success? end |
Instance Attribute Details
#created_post ⇒ Object
Returns the value of attribute created_post.
7 8 9 |
# File 'lib/reviewable/perform_result.rb', line 7 def created_post @created_post end |
#created_post_topic ⇒ Object (readonly)
Returns the value of attribute created_post_topic.
7 8 9 |
# File 'lib/reviewable/perform_result.rb', line 7 def created_post_topic @created_post_topic end |
#errors ⇒ Object
Returns the value of attribute errors.
8 9 10 |
# File 'lib/reviewable/perform_result.rb', line 8 def errors @errors end |
#recalculate_score ⇒ Object
Returns the value of attribute recalculate_score.
8 9 10 |
# File 'lib/reviewable/perform_result.rb', line 8 def recalculate_score @recalculate_score end |
#remove_reviewable_ids ⇒ Object
Returns the value of attribute remove_reviewable_ids.
8 9 10 |
# File 'lib/reviewable/perform_result.rb', line 8 def remove_reviewable_ids @remove_reviewable_ids end |
#reviewable ⇒ Object (readonly)
Returns the value of attribute reviewable.
7 8 9 |
# File 'lib/reviewable/perform_result.rb', line 7 def reviewable @reviewable end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
7 8 9 |
# File 'lib/reviewable/perform_result.rb', line 7 def status @status end |
#transition_to ⇒ Object
Returns the value of attribute transition_to.
8 9 10 |
# File 'lib/reviewable/perform_result.rb', line 8 def transition_to @transition_to end |
#update_flag_stats ⇒ Object
Returns the value of attribute update_flag_stats.
8 9 10 |
# File 'lib/reviewable/perform_result.rb', line 8 def update_flag_stats @update_flag_stats end |
Instance Method Details
#success? ⇒ Boolean
28 29 30 |
# File 'lib/reviewable/perform_result.rb', line 28 def success? @status == :success end |