Class: Clonk::Policy
- Inherits:
-
Object
- Object
- Clonk::Policy
- Defined in:
- lib/clonk/policy.rb
Overview
Represents a policy in SSO. FIXME: Has not been fully updated from v1’s use of the API.
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Class Method Summary collapse
-
.defaults ⇒ Object
Returns defaults for a policy.
Instance Method Summary collapse
-
#initialize(policy_response) ⇒ Policy
constructor
A new instance of Policy.
Constructor Details
#initialize(policy_response) ⇒ Policy
Returns a new instance of Policy.
10 11 12 13 |
# File 'lib/clonk/policy.rb', line 10 def initialize(policy_response) @id = policy_response['id'] @name = policy_response['name'] end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
7 8 9 |
# File 'lib/clonk/policy.rb', line 7 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
8 9 10 |
# File 'lib/clonk/policy.rb', line 8 def name @name end |
Class Method Details
.defaults ⇒ Object
Returns defaults for a policy. I’ve found no reason to override these, but then again, I’m not 100% sure how they work. Overrides will be added to necessary methods if requested.
19 20 21 22 23 24 |
# File 'lib/clonk/policy.rb', line 19 def self.defaults { logic: 'POSITIVE', decisionStrategy: 'UNANIMOUS' } end |