Class: Conjur::Policy::Types::Update

Inherits:
Base show all
Defined in:
lib/conjur/policy/types/update.rb

Instance Method Summary collapse

Methods inherited from Base

#custom_attribute_names, #id_attribute, inherited, #referenced_records, register_yaml_type, #resource?, #role?, short_name

Methods included from InheritableAttribute

inherit_for, #inheritable_attr

Methods included from TypeChecking

#expect_array, #expect_boolean, #expect_hash, #expect_integer, #expect_layer, #expect_member, #expect_permission, #expect_record, #expect_resource, #expect_role, #expect_string, #expect_type, #test_resource, #test_role

Methods included from AttributeDefinition

#attribute, #define_field, #define_plural_field, #field?, #yaml_field?, #yaml_field_type

Instance Method Details

#to_sObject



25
26
27
28
29
30
31
32
33
34
# File 'lib/conjur/policy/types/update.rb', line 25

def to_s
  messages = [ "Update #{record}" ]
  (record.custom_attribute_names||[]).each do |k|
    messages.push "  Set field '#{k}'" 
  end
  (record.annotations||{}).each do |k,v|
    messages.push "  Set annotation '#{k}'"
  end
  messages.join("\n")
end