Class: ChefCLI::Policyfile::UndoRecord::PolicyGroupRestoreData

Inherits:
Struct
  • Object
show all
Defined in:
lib/chef-cli/policyfile/undo_record.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#dataObject

Returns the value of attribute data

Returns:

  • (Object)

    the current value of data



25
26
27
# File 'lib/chef-cli/policyfile/undo_record.rb', line 25

def data
  @data
end

#policy_groupObject

Returns the value of attribute policy_group

Returns:

  • (Object)

    the current value of policy_group



25
26
27
# File 'lib/chef-cli/policyfile/undo_record.rb', line 25

def policy_group
  @policy_group
end

#policy_nameObject

Returns the value of attribute policy_name

Returns:

  • (Object)

    the current value of policy_name



25
26
27
# File 'lib/chef-cli/policyfile/undo_record.rb', line 25

def policy_name
  @policy_name
end

Instance Method Details

#for_serializationObject



34
35
36
37
38
39
40
# File 'lib/chef-cli/policyfile/undo_record.rb', line 34

def for_serialization
  {
    "policy_name" => policy_name,
    "policy_group" => policy_group,
    "data" => data,
  }
end

#load(data) ⇒ Object



27
28
29
30
31
32
# File 'lib/chef-cli/policyfile/undo_record.rb', line 27

def load(data)
  self.policy_name = data["policy_name"]
  self.policy_group = data["policy_group"]
  self.data = data["data"]
  self
end