Exception: Walruz::ActionNotFound

Inherits:
Exception
  • Object
show all
Defined in:
lib/walruz/exceptions.rb

Instance Method Summary collapse

Constructor Details

#initialize(failure, params = {}) ⇒ ActionNotFound

Returns a new instance of ActionNotFound.



31
32
33
34
35
36
37
38
# File 'lib/walruz/exceptions.rb', line 31

def initialize(failure, params = {})
  case failure
  when :subject_action
    super("%s class doesn't have an authorization action called :%s nor a :default policy" % [params[:subject].class.name, params[:action]])
  when :policy_label
    super("There is no Policy with the label %s" % params[:label])
  end
end