Class: LucidPolicy::Helper
- Inherits:
- BasicObject
- Defined in:
- lib/isomorfeus_policy/lucid_policy/helper.rb
Instance Attribute Summary collapse
-
#result ⇒ Object
readonly
Returns the value of attribute result.
Instance Method Summary collapse
- #allow ⇒ Object
- #current_user ⇒ Object
- #deny ⇒ Object
-
#initialize ⇒ Helper
constructor
A new instance of Helper.
Constructor Details
#initialize ⇒ Helper
Returns a new instance of Helper.
5 6 7 |
# File 'lib/isomorfeus_policy/lucid_policy/helper.rb', line 5 def initialize @result = :deny end |
Instance Attribute Details
#result ⇒ Object (readonly)
Returns the value of attribute result.
3 4 5 |
# File 'lib/isomorfeus_policy/lucid_policy/helper.rb', line 3 def result @result end |
Instance Method Details
#allow ⇒ Object
9 10 11 12 |
# File 'lib/isomorfeus_policy/lucid_policy/helper.rb', line 9 def allow @result = :allow nil end |
#current_user ⇒ Object
18 19 20 |
# File 'lib/isomorfeus_policy/lucid_policy/helper.rb', line 18 def current_user Isomorfeus.current_user end |
#deny ⇒ Object
14 15 16 |
# File 'lib/isomorfeus_policy/lucid_policy/helper.rb', line 14 def deny nil end |