Exception: PropertyString::MethodNotAllowed

Inherits:
StandardError
  • Object
show all
Defined in:
lib/property_string.rb

Instance Method Summary collapse

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