module Console1984::Freezeable::ClassMethods
Constants
- SENSITIVE_INSTANCE_METHODS
Public Instance Methods
prevent_instance_data_manipulation()
click to toggle source
# File lib/console1984/freezeable.rb, line 33 def prevent_instance_data_manipulation SENSITIVE_INSTANCE_METHODS.each do |method| prevent_sensitive_method method end end
Private Instance Methods
prevent_sensitive_method(method_name)
click to toggle source
# File lib/console1984/freezeable.rb, line 40 def prevent_sensitive_method(method_name) define_method method_name do |*arguments| raise Console1984::Errors::ForbiddenCommandAttempted, "You can't invoke #{method_name} on #{self}" end end