class Module
Public Instance Methods
redefine_method(method, &block)
click to toggle source
# File lib/attr_validator/core_extensions/class_attribute.rb, line 15 def redefine_method(method, &block) remove_possible_method(method) define_method(method, &block) end
remove_possible_method(method)
click to toggle source
# File lib/attr_validator/core_extensions/class_attribute.rb, line 9 def remove_possible_method(method) if method_defined?(method) || private_method_defined?(method) undef_method(method) end end