Class: Retab::DeclarativePlanChange
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Retab::DeclarativePlanChange
- Defined in:
- lib/retab/workflow_specs/declarative_plan_change.rb
Constant Summary collapse
- HASH_ATTRS =
{ before: :before, after: :after, before_sensitive: :before_sensitive, after_sensitive: :after_sensitive, field_changes: :field_changes }.freeze
Instance Attribute Summary collapse
-
#after ⇒ Object
Returns the value of attribute after.
-
#after_sensitive ⇒ Object
Returns the value of attribute after_sensitive.
-
#before ⇒ Object
Returns the value of attribute before.
-
#before_sensitive ⇒ Object
Returns the value of attribute before_sensitive.
-
#field_changes ⇒ Object
Returns the value of attribute field_changes.
Attributes inherited from Types::BaseModel
Instance Method Summary collapse
-
#initialize(json) ⇒ DeclarativePlanChange
constructor
A new instance of DeclarativePlanChange.
Methods inherited from Types::BaseModel
#inspect, normalize, #to_h, #to_json
Constructor Details
#initialize(json) ⇒ DeclarativePlanChange
Returns a new instance of DeclarativePlanChange.
23 24 25 26 27 28 29 30 |
# File 'lib/retab/workflow_specs/declarative_plan_change.rb', line 23 def initialize(json) hash = self.class.normalize(json) @before = hash[:before] @after = hash[:after] @before_sensitive = hash[:before_sensitive] @after_sensitive = hash[:after_sensitive] @field_changes = (hash[:field_changes] || []).map { |item| item ? Retab::DeclarativePlanFieldChange.new(item) : nil } end |
Instance Attribute Details
#after ⇒ Object
Returns the value of attribute after.
16 17 18 |
# File 'lib/retab/workflow_specs/declarative_plan_change.rb', line 16 def after @after end |
#after_sensitive ⇒ Object
Returns the value of attribute after_sensitive.
16 17 18 |
# File 'lib/retab/workflow_specs/declarative_plan_change.rb', line 16 def after_sensitive @after_sensitive end |
#before ⇒ Object
Returns the value of attribute before.
16 17 18 |
# File 'lib/retab/workflow_specs/declarative_plan_change.rb', line 16 def before @before end |
#before_sensitive ⇒ Object
Returns the value of attribute before_sensitive.
16 17 18 |
# File 'lib/retab/workflow_specs/declarative_plan_change.rb', line 16 def before_sensitive @before_sensitive end |
#field_changes ⇒ Object
Returns the value of attribute field_changes.
16 17 18 |
# File 'lib/retab/workflow_specs/declarative_plan_change.rb', line 16 def field_changes @field_changes end |