Exception: PropertyString::MethodNotAllowed
- Inherits:
-
StandardError
- Object
- StandardError
- PropertyString::MethodNotAllowed
- Defined in:
- lib/property_string.rb
Instance Method Summary collapse
-
#initialize(object, method) ⇒ MethodNotAllowed
constructor
A new instance of MethodNotAllowed.
Constructor Details
#initialize(object, method) ⇒ MethodNotAllowed
Returns a new instance of MethodNotAllowed.
8 9 10 11 |
# File 'lib/property_string.rb', line 8 def initialize(object, method) target = object.is_a?(Class) ? "#{object}.#{method}" : "#{object.class}##{method}" super "Access to #{target} is not allowed" end |