Class: Configurations::Validators::ReservedMethods

Inherits:
Object
  • Object
show all
Defined in:
lib/configurations/validators/reserved_methods.rb

Instance Method Summary collapse

Instance Method Details

#validate!(method) ⇒ Object

Parameters:

  • method (Symbol)

    the method to test for reservedness

Raises:



8
9
10
11
12
13
# File 'lib/configurations/validators/reserved_methods.rb', line 8

def validate!(method)
  ::Kernel.fail(
    ::Configurations::ReservedMethodError,
    "#{method} is a reserved method and can not be assigned"
  ) if reserved?(method)
end