Class: ARBACVerifier::Instance
- Inherits:
-
Object
- Object
- ARBACVerifier::Instance
- Extended by:
- T::Sig
- Defined in:
- lib/arbac_verifier/classes/instance.rb
Instance Attribute Summary collapse
-
#can_assign_rules ⇒ Object
readonly
Returns the value of attribute can_assign_rules.
-
#can_revoke_rules ⇒ Object
readonly
Returns the value of attribute can_revoke_rules.
-
#goal ⇒ Object
readonly
Returns the value of attribute goal.
-
#roles ⇒ Object
readonly
Returns the value of attribute roles.
-
#user_to_role ⇒ Object
readonly
Returns the value of attribute user_to_role.
-
#users ⇒ Object
readonly
Returns the value of attribute users.
Instance Method Summary collapse
-
#initialize(**params) ⇒ Instance
constructor
A new instance of Instance.
Constructor Details
#initialize(**params) ⇒ Instance
Returns a new instance of Instance.
32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/arbac_verifier/classes/instance.rb', line 32 def initialize(**params) if params[:path].nil? initialize_by_attributes( T.cast(params[:goal], Symbol), T.cast(params[:roles], T::Set[Symbol]), T.cast(params[:users], T::Set[String]), T.cast(params[:user_to_role], T::Set[UserRole]), T.cast(params[:can_assign_rules], T::Set[Rules::CanAssign]), T.cast(params[:can_revoke_rules], T::Set[Rules::CanRevoke]) ) else initialize_by_file_path(T.cast(params[:path], String)) end end |
Instance Attribute Details
#can_assign_rules ⇒ Object (readonly)
Returns the value of attribute can_assign_rules.
26 27 28 |
# File 'lib/arbac_verifier/classes/instance.rb', line 26 def can_assign_rules @can_assign_rules end |
#can_revoke_rules ⇒ Object (readonly)
Returns the value of attribute can_revoke_rules.
23 24 25 |
# File 'lib/arbac_verifier/classes/instance.rb', line 23 def can_revoke_rules @can_revoke_rules end |
#goal ⇒ Object (readonly)
Returns the value of attribute goal.
29 30 31 |
# File 'lib/arbac_verifier/classes/instance.rb', line 29 def goal @goal end |
#roles ⇒ Object (readonly)
Returns the value of attribute roles.
14 15 16 |
# File 'lib/arbac_verifier/classes/instance.rb', line 14 def roles @roles end |
#user_to_role ⇒ Object (readonly)
Returns the value of attribute user_to_role.
20 21 22 |
# File 'lib/arbac_verifier/classes/instance.rb', line 20 def user_to_role @user_to_role end |
#users ⇒ Object (readonly)
Returns the value of attribute users.
17 18 19 |
# File 'lib/arbac_verifier/classes/instance.rb', line 17 def users @users end |