# Pull members up, push members down

> For the complete documentation index, see [llms.txt](https://www.jetbrains.com/help/ruby/2026.3/llms.txt).

The Pull Members Up refactoring allows you to move class members to a specified superclass. Push Members Down moves class members to a subclass.

## Pull members up

To pull members up:

Procedure:

1. Place a caret at the class name or any place within a class:

![place the caret](https://resources.jetbrains.com/help/img/idea/2026.3/rm_refactoring_pull_up_caret.animated.gif)

2. Go to `Refactor | Pull Members Up...`.

3. In the invoked dialog, select the desired members and the superclass where these members will be placed:

![Pull Members Up dialog](https://resources.jetbrains.com/help/img/idea/2026.3/rm_refactoring_pull_up_dialog.png)

Click OK.

| Before | After |
| --- | --- |
|  cat.rb file    ```RUBY class Cat < Mammal   def move     puts "move"   end   def speak     puts "Meow"   end end ```    |  animal.rb file    ```RUBY class Animal def move puts "move" end end ```   cat.rb file    ```RUBY class Cat < Mammal   def speak     puts "Meow"   end end ```    |

## Push members down

To push members down:

Procedure:

1. Place a caret at the class name or any place within a class.

2. In the main menu, go to `Refactor | Push Members Down...`.

3. In the invoked dialog, select the desired members that will be moved to a subclass:

![Push Members Down dialog](https://resources.jetbrains.com/help/img/idea/2026.3/rm_refactoring_push_down_dialog.png)

Click OK.

| Before | After |
| --- | --- |
|  animal.rb file    ```RUBY class Animal def breathe puts "inhale and exhale" end def move puts "move" end end ```   mammal.rb file    ```RUBY class Mammal < Animal end ```    |  animal.rb file    ```RUBY class Animal def move puts "move" end end ```   mammal.rb file    ```RUBY class Mammal < Animal   def breathe     puts "inhale and exhale"   end end ```    |

## See also

### Procedures

[Refactor code](refactoring-source-code.html)

