Class: Retab::DeclarativePlanSummary

Inherits:
Types::BaseModel show all
Defined in:
lib/retab/workflow_specs/declarative_plan_summary.rb

Constant Summary collapse

HASH_ATTRS =
{
  add: :add,
  change: :change,
  destroy: :destroy,
  replace: :replace,
  noop: :noop,
  total: :total,
  has_changes: :has_changes
}.freeze

Instance Attribute Summary collapse

Attributes inherited from Types::BaseModel

#last_response

Instance Method Summary collapse

Methods inherited from Types::BaseModel

#inspect, normalize, #to_h, #to_json

Constructor Details

#initialize(json) ⇒ DeclarativePlanSummary

Returns a new instance of DeclarativePlanSummary.



27
28
29
30
31
32
33
34
35
36
# File 'lib/retab/workflow_specs/declarative_plan_summary.rb', line 27

def initialize(json)
  hash = self.class.normalize(json)
  @add = hash[:add]
  @change = hash[:change]
  @destroy = hash[:destroy]
  @replace = hash[:replace]
  @noop = hash[:noop]
  @total = hash[:total]
  @has_changes = hash[:has_changes]
end

Instance Attribute Details

#addObject

Returns the value of attribute add.



18
19
20
# File 'lib/retab/workflow_specs/declarative_plan_summary.rb', line 18

def add
  @add
end

#changeObject

Returns the value of attribute change.



18
19
20
# File 'lib/retab/workflow_specs/declarative_plan_summary.rb', line 18

def change
  @change
end

#destroyObject

Returns the value of attribute destroy.



18
19
20
# File 'lib/retab/workflow_specs/declarative_plan_summary.rb', line 18

def destroy
  @destroy
end

#has_changesObject

Returns the value of attribute has_changes.



18
19
20
# File 'lib/retab/workflow_specs/declarative_plan_summary.rb', line 18

def has_changes
  @has_changes
end

#noopObject

Returns the value of attribute noop.



18
19
20
# File 'lib/retab/workflow_specs/declarative_plan_summary.rb', line 18

def noop
  @noop
end

#replaceObject

Returns the value of attribute replace.



18
19
20
# File 'lib/retab/workflow_specs/declarative_plan_summary.rb', line 18

def replace
  @replace
end

#totalObject

Returns the value of attribute total.



18
19
20
# File 'lib/retab/workflow_specs/declarative_plan_summary.rb', line 18

def total
  @total
end