Class: Conjur::Policy::Types::Policy
- Includes:
- ActsAsResource, ActsAsRole
- Defined in:
- lib/conjur/policy/types/policy.rb
Overview
Policy includes the functionality of Entitlements, wrapped in a policy role, policy resource, policy id and policy version.
Instance Method Summary collapse
- #body(&block) ⇒ Object
- #body=(body) ⇒ Object
-
#referenced_records ⇒ Object
Body is handled specially.
- #resource ⇒ Object
- #role ⇒ Object
Methods included from ActsAsRole
#role?, #role_id, #role_kind, #roleid
Methods included from ActsAsResource
#action, #immutable_attribute_names, included, #initialize, #resource?, #resource_id, #resource_kind, #resourceid, #to_s
Methods inherited from Record
Methods inherited from Base
#custom_attribute_names, #id_attribute, inherited, 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
#body(&block) ⇒ Object
133 134 135 136 137 138 |
# File 'lib/conjur/policy/types/policy.rb', line 133 def body &block if block_given? singleton :body, lambda { Body.new }, &block end @body end |
#body=(body) ⇒ Object
140 141 142 |
# File 'lib/conjur/policy/types/policy.rb', line 140 def body= body @body = body end |
#referenced_records ⇒ Object
Body is handled specially.
129 130 131 |
# File 'lib/conjur/policy/types/policy.rb', line 129 def referenced_records super - Array(@body) end |