Exception: Yay::NotAllowedError
- Defined in:
- lib/yay/errors.rb
Overview
this is a generic access control error that’s raised when someoen tries to do something disallowed in their current context. for example, you can use the install command from the command line but not a yayfile
Instance Attribute Summary collapse
-
#action ⇒ Object
readonly
Returns the value of attribute action.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Attributes inherited from Error
Instance Method Summary collapse
-
#initialize(action, path) ⇒ NotAllowedError
constructor
A new instance of NotAllowedError.
- #printable_message ⇒ Object
Methods inherited from Error
Constructor Details
#initialize(action, path) ⇒ NotAllowedError
Returns a new instance of NotAllowedError.
82 83 84 85 |
# File 'lib/yay/errors.rb', line 82 def initialize action, path @action = action @path = path end |
Instance Attribute Details
#action ⇒ Object (readonly)
Returns the value of attribute action.
79 80 81 |
# File 'lib/yay/errors.rb', line 79 def action @action end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
80 81 82 |
# File 'lib/yay/errors.rb', line 80 def path @path end |
Instance Method Details
#printable_message ⇒ Object
87 88 89 |
# File 'lib/yay/errors.rb', line 87 def return "You can't #{action} from here" end |