Class: Admission::Tests::ContextSpecificPrivilege
- Inherits:
-
Object
- Object
- Admission::Tests::ContextSpecificPrivilege
- Defined in:
- lib/admission/tests/tests.rb
Instance Attribute Summary collapse
-
#privilege ⇒ Object
readonly
Returns the value of attribute privilege.
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean
-
#initialize(privilege) ⇒ ContextSpecificPrivilege
constructor
A new instance of ContextSpecificPrivilege.
Constructor Details
#initialize(privilege) ⇒ ContextSpecificPrivilege
Returns a new instance of ContextSpecificPrivilege.
101 102 103 104 |
# File 'lib/admission/tests/tests.rb', line 101 def initialize privilege @privilege = privilege @hash = [privilege.name, privilege.level, privilege.context].hash end |
Instance Attribute Details
#privilege ⇒ Object (readonly)
Returns the value of attribute privilege.
99 100 101 |
# File 'lib/admission/tests/tests.rb', line 99 def privilege @privilege end |
Instance Method Details
#eql?(other) ⇒ Boolean
106 107 108 |
# File 'lib/admission/tests/tests.rb', line 106 def eql? other hash == other.hash end |