Exception: ActiveEntry::NotDefinedError

Inherits:
Error
  • Object
show all
Defined in:
lib/active_entry/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(policy_name, class_name) ⇒ NotDefinedError

Returns a new instance of NotDefinedError.



45
46
47
48
49
50
51
# File 'lib/active_entry/errors.rb', line 45

def initialize policy_name, class_name
  @policy_name = policy_name
  @class_name = class_name
  @message = "Policy #{policy_name} for class #{@class_name} not defined."

  super @message
end

Instance Attribute Details

#class_nameObject (readonly)

Returns the value of attribute class_name.



43
44
45
# File 'lib/active_entry/errors.rb', line 43

def class_name
  @class_name
end

#policy_nameObject (readonly)

Returns the value of attribute policy_name.



43
44
45
# File 'lib/active_entry/errors.rb', line 43

def policy_name
  @policy_name
end