Exception: Discourse::InvalidAccess
- Inherits:
-
StandardError
- Object
- StandardError
- Discourse::InvalidAccess
- Defined in:
- lib/discourse.rb
Overview
When they don’t have permission to do something
Instance Attribute Summary collapse
-
#custom_message ⇒ Object
readonly
Returns the value of attribute custom_message.
-
#custom_message_params ⇒ Object
readonly
Returns the value of attribute custom_message_params.
-
#group ⇒ Object
readonly
Returns the value of attribute group.
-
#obj ⇒ Object
readonly
Returns the value of attribute obj.
-
#opts ⇒ Object
readonly
Returns the value of attribute opts.
Instance Method Summary collapse
-
#initialize(msg = nil, obj = nil, opts = nil) ⇒ InvalidAccess
constructor
A new instance of InvalidAccess.
Constructor Details
#initialize(msg = nil, obj = nil, opts = nil) ⇒ InvalidAccess
Returns a new instance of InvalidAccess.
260 261 262 263 264 265 266 267 268 |
# File 'lib/discourse.rb', line 260 def initialize(msg = nil, obj = nil, opts = nil) super(msg) @opts = opts || {} @obj = obj @custom_message = opts[:custom_message] if @opts[:custom_message] @custom_message_params = opts[:custom_message_params] if @opts[:custom_message_params] @group = opts[:group] if @opts[:group] end |
Instance Attribute Details
#custom_message ⇒ Object (readonly)
Returns the value of attribute custom_message.
256 257 258 |
# File 'lib/discourse.rb', line 256 def @custom_message end |
#custom_message_params ⇒ Object (readonly)
Returns the value of attribute custom_message_params.
257 258 259 |
# File 'lib/discourse.rb', line 257 def @custom_message_params end |
#group ⇒ Object (readonly)
Returns the value of attribute group.
258 259 260 |
# File 'lib/discourse.rb', line 258 def group @group end |
#obj ⇒ Object (readonly)
Returns the value of attribute obj.
254 255 256 |
# File 'lib/discourse.rb', line 254 def obj @obj end |
#opts ⇒ Object (readonly)
Returns the value of attribute opts.
255 256 257 |
# File 'lib/discourse.rb', line 255 def opts @opts end |