Class: Conjur::Policy::Ruby::Policy

Inherits:
Types::Base show all
Includes:
Types::ActsAsResource, Types::ActsAsRole
Defined in:
lib/conjur/policy/ruby/loader.rb

Overview

Policy includes the functionality of Entitlements, wrapped in a policy role, policy resource, policy id and policy version.

Instance Method Summary collapse

Methods included from Types::ActsAsRole

#role?, #role_id, #role_kind, #roleid

Methods included from Types::ActsAsResource

#action, #immutable_attribute_names, included, #initialize, #resource?, #resource_id, #resource_kind, #resourceid, #to_s

Methods inherited from Types::Base

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

Methods included from Types::InheritableAttribute

inherit_for, #inheritable_attr

Methods included from Types::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 Types::AttributeDefinition

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

Instance Method Details

#body(&block) ⇒ Object



144
145
146
147
# File 'lib/conjur/policy/ruby/loader.rb', line 144

def body &block
  singleton :body, lambda { Body.new }, &block
  @body
end

#body=(body) ⇒ Object



149
150
151
# File 'lib/conjur/policy/ruby/loader.rb', line 149

def body= body
  @body = body
end