Exception: ParamAccessible::Error
- Inherits:
-
Exception
- Object
- Exception
- ParamAccessible::Error
- Defined in:
- lib/param_accessible/error.rb
Instance Attribute Summary collapse
-
#inaccessible_params ⇒ Object
readonly
Returns the value of attribute inaccessible_params.
Instance Method Summary collapse
-
#initialize(inaccessible_params) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(inaccessible_params) ⇒ Error
Returns a new instance of Error.
7 8 9 10 11 12 13 14 15 |
# File 'lib/param_accessible/error.rb', line 7 def initialize inaccessible_params if inaccessible_params.length == 1 super "#{inaccessible_params.join(', ')} is an invalid parameter" else super "#{inaccessible_params.join(', ')} are invalid parameters" end @inaccessible_params = inaccessible_params end |
Instance Attribute Details
#inaccessible_params ⇒ Object (readonly)
Returns the value of attribute inaccessible_params.
5 6 7 |
# File 'lib/param_accessible/error.rb', line 5 def inaccessible_params @inaccessible_params end |