Class: Retab::ReviewDecision
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Retab::ReviewDecision
- Defined in:
- lib/retab/workflow_reviews/review_decision.rb
Constant Summary collapse
- HASH_ATTRS =
{ verdict: :verdict, version_id: :version_id, author: :author, decided_at: :decided_at, reason: :reason }.freeze
Instance Attribute Summary collapse
-
#author ⇒ Object
Returns the value of attribute author.
-
#decided_at ⇒ Object
Returns the value of attribute decided_at.
-
#reason ⇒ Object
Returns the value of attribute reason.
-
#verdict ⇒ Object
Returns the value of attribute verdict.
-
#version_id ⇒ Object
Returns the value of attribute version_id.
Attributes inherited from Types::BaseModel
Instance Method Summary collapse
-
#initialize(json) ⇒ ReviewDecision
constructor
A new instance of ReviewDecision.
Methods inherited from Types::BaseModel
#inspect, normalize, #to_h, #to_json
Constructor Details
#initialize(json) ⇒ ReviewDecision
Returns a new instance of ReviewDecision.
23 24 25 26 27 28 29 30 |
# File 'lib/retab/workflow_reviews/review_decision.rb', line 23 def initialize(json) hash = self.class.normalize(json) @verdict = hash[:verdict] @version_id = hash[:version_id] @author = hash[:author] ? Retab::Actor.new(hash[:author]) : nil @decided_at = hash[:decided_at] @reason = hash[:reason] end |
Instance Attribute Details
#author ⇒ Object
Returns the value of attribute author.
16 17 18 |
# File 'lib/retab/workflow_reviews/review_decision.rb', line 16 def @author end |
#decided_at ⇒ Object
Returns the value of attribute decided_at.
16 17 18 |
# File 'lib/retab/workflow_reviews/review_decision.rb', line 16 def decided_at @decided_at end |
#reason ⇒ Object
Returns the value of attribute reason.
16 17 18 |
# File 'lib/retab/workflow_reviews/review_decision.rb', line 16 def reason @reason end |
#verdict ⇒ Object
Returns the value of attribute verdict.
16 17 18 |
# File 'lib/retab/workflow_reviews/review_decision.rb', line 16 def verdict @verdict end |
#version_id ⇒ Object
Returns the value of attribute version_id.
16 17 18 |
# File 'lib/retab/workflow_reviews/review_decision.rb', line 16 def version_id @version_id end |