Class: Retab::DeclarativePlanFieldChange

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

Constant Summary collapse

HASH_ATTRS =
{
  path: :path,
  path_display: :path_display,
  action: :action,
  before: :before,
  after: :after,
  before_sensitive: :before_sensitive,
  after_sensitive: :after_sensitive,
  unified_diff: :unified_diff
}.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) ⇒ DeclarativePlanFieldChange

Returns a new instance of DeclarativePlanFieldChange.



29
30
31
32
33
34
35
36
37
38
39
# File 'lib/retab/workflow_specs/declarative_plan_field_change.rb', line 29

def initialize(json)
  hash = self.class.normalize(json)
  @path = (hash[:path] || [])
  @path_display = hash[:path_display]
  @action = hash[:action]
  @before = hash[:before]
  @after = hash[:after]
  @before_sensitive = hash[:before_sensitive]
  @after_sensitive = hash[:after_sensitive]
  @unified_diff = hash[:unified_diff]
end

Instance Attribute Details

#actionObject

Returns the value of attribute action.



19
20
21
# File 'lib/retab/workflow_specs/declarative_plan_field_change.rb', line 19

def action
  @action
end

#afterObject

Returns the value of attribute after.



19
20
21
# File 'lib/retab/workflow_specs/declarative_plan_field_change.rb', line 19

def after
  @after
end

#after_sensitiveObject

Returns the value of attribute after_sensitive.



19
20
21
# File 'lib/retab/workflow_specs/declarative_plan_field_change.rb', line 19

def after_sensitive
  @after_sensitive
end

#beforeObject

Returns the value of attribute before.



19
20
21
# File 'lib/retab/workflow_specs/declarative_plan_field_change.rb', line 19

def before
  @before
end

#before_sensitiveObject

Returns the value of attribute before_sensitive.



19
20
21
# File 'lib/retab/workflow_specs/declarative_plan_field_change.rb', line 19

def before_sensitive
  @before_sensitive
end

#pathObject

Returns the value of attribute path.



19
20
21
# File 'lib/retab/workflow_specs/declarative_plan_field_change.rb', line 19

def path
  @path
end

#path_displayObject

Returns the value of attribute path_display.



19
20
21
# File 'lib/retab/workflow_specs/declarative_plan_field_change.rb', line 19

def path_display
  @path_display
end

#unified_diffObject

Returns the value of attribute unified_diff.



19
20
21
# File 'lib/retab/workflow_specs/declarative_plan_field_change.rb', line 19

def unified_diff
  @unified_diff
end