RubyMine code refactoring