---
title: "Discussion on \"Remove Nested module constant in ruby\" | Hashnode"
description: "Discussion on \"Remove Nested module constant in ruby\". You might have seen this solution.\nObject.send(:remove_const, :ExampleClass)\n\nBut what if you want to remove namespaced classes in Ruby. You can use the same method, but instead of Object use the parent module where your class is nested.\nmodule App\n ..."
url: "https://hashnode.com/posts/remove-nested-module-constant-in-ruby/65300ebaea449e8bb18f2d2e"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Remove Nested module constant in ruby](https://tenzinchemi.in/remove-nested-module-constant-in-ruby?utm_source=hashnode&utm_medium=feed)

You might have seen this solution. Object.send(:remove\_const, :ExampleClass) But what if you want to remove namespaced classes in Ruby. You can use the same method, but instead of Object use the parent module where your class is nested. module App ...

Oct 18, 2023 · 1 min read · tenzinchemi.in  
Read the article

-   [#ruby](https://hashnode.com/tag/ruby)

## Written by

[Tenzin Chemi](https://hashnode.com/@imechemi)

@imechemi

  
[View profile](https://hashnode.com/@imechemi)

I write softwares

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
