Class: Retab::WorkflowBlockVersionDiff
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Retab::WorkflowBlockVersionDiff
- Defined in:
- lib/retab/workflow_blocks/workflow_block_version_diff.rb
Constant Summary collapse
- HASH_ATTRS =
{ from_block_version_id: :from_block_version_id, to_block_version_id: :to_block_version_id, block_id: :block_id, changes: :changes }.freeze
Instance Attribute Summary collapse
-
#block_id ⇒ Object
Returns the value of attribute block_id.
-
#changes ⇒ Object
Returns the value of attribute changes.
-
#from_block_version_id ⇒ Object
Returns the value of attribute from_block_version_id.
-
#to_block_version_id ⇒ Object
Returns the value of attribute to_block_version_id.
Attributes inherited from Types::BaseModel
Instance Method Summary collapse
-
#initialize(json) ⇒ WorkflowBlockVersionDiff
constructor
A new instance of WorkflowBlockVersionDiff.
Methods inherited from Types::BaseModel
deep_symbolize, #inspect, normalize, #to_h, #to_json
Constructor Details
#initialize(json) ⇒ WorkflowBlockVersionDiff
Returns a new instance of WorkflowBlockVersionDiff.
22 23 24 25 26 27 28 29 |
# File 'lib/retab/workflow_blocks/workflow_block_version_diff.rb', line 22 def initialize(json) super() hash = self.class.normalize(json) @from_block_version_id = hash[:from_block_version_id] @to_block_version_id = hash[:to_block_version_id] @block_id = hash[:block_id] @changes = (hash[:changes] || []).map { |item| item ? Retab::WorkflowVersionFieldDiff.new(item) : nil } end |
Instance Attribute Details
#block_id ⇒ Object
Returns the value of attribute block_id.
15 16 17 |
# File 'lib/retab/workflow_blocks/workflow_block_version_diff.rb', line 15 def block_id @block_id end |
#changes ⇒ Object
Returns the value of attribute changes.
15 16 17 |
# File 'lib/retab/workflow_blocks/workflow_block_version_diff.rb', line 15 def changes @changes end |
#from_block_version_id ⇒ Object
Returns the value of attribute from_block_version_id.
15 16 17 |
# File 'lib/retab/workflow_blocks/workflow_block_version_diff.rb', line 15 def from_block_version_id @from_block_version_id end |
#to_block_version_id ⇒ Object
Returns the value of attribute to_block_version_id.
15 16 17 |
# File 'lib/retab/workflow_blocks/workflow_block_version_diff.rb', line 15 def to_block_version_id @to_block_version_id end |