Exception: Kindergarten::Perimeter::RestrictedMethodError

Inherits:
ArgumentError
  • Object
show all
Defined in:
lib/kindergarten/exceptions.rb

Instance Method Summary collapse

Constructor Details

#initialize(perimeter, method) ⇒ RestrictedMethodError

Returns a new instance of RestrictedMethodError.



52
53
54
55
# File 'lib/kindergarten/exceptions.rb', line 52

def initialize(perimeter, method)
  @perimeter = perimeter
  @method    = method
end

Instance Method Details

#to_sObject



57
58
59
# File 'lib/kindergarten/exceptions.rb', line 57

def to_s
  "You exposed '#{method}' on the #{perimeter}, but that is a restricted method"
end