Exception: Moat::ActionNotFoundError
- Inherits:
-
NotFoundError
- Object
- StandardError
- Error
- NotFoundError
- Moat::ActionNotFoundError
- Defined in:
- lib/moat.rb
Instance Attribute Summary collapse
-
#action ⇒ Object
readonly
Returns the value of attribute action.
-
#policy ⇒ Object
readonly
Returns the value of attribute policy.
-
#resource ⇒ Object
readonly
Returns the value of attribute resource.
-
#user ⇒ Object
readonly
Returns the value of attribute user.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ ActionNotFoundError
constructor
A new instance of ActionNotFoundError.
Constructor Details
#initialize(options = {}) ⇒ ActionNotFoundError
Returns a new instance of ActionNotFoundError.
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/moat.rb', line 10 def initialize( = {}) return super if .is_a?(String) @action = [:action] @resource = [:resource] @policy = [:policy] @user = [:user] = .fetch(:message) { "#{policy.name}##{action}" } super() end |
Instance Attribute Details
#action ⇒ Object (readonly)
Returns the value of attribute action
8 9 10 |
# File 'lib/moat.rb', line 8 def action @action end |
#policy ⇒ Object (readonly)
Returns the value of attribute policy
8 9 10 |
# File 'lib/moat.rb', line 8 def policy @policy end |
#resource ⇒ Object (readonly)
Returns the value of attribute resource
8 9 10 |
# File 'lib/moat.rb', line 8 def resource @resource end |
#user ⇒ Object (readonly)
Returns the value of attribute user
8 9 10 |
# File 'lib/moat.rb', line 8 def user @user end |