I want to transform emails only showing the first two characters and substitute the rest of them with '\*' and keep the '@domain.com' as it is, how can I do it

I already have this code that works as expected but I would like to have a reduced way to do it, I don't know if there is a way to do it with `gsub` method and pass some ranges, any help will be appreciated

```rb
email = 'email@domain.com'
splitted_email = email.partition('@')
splitted_email.first[2...email.size-2]
splitted_email[0] = splitted_email.first[0...2] + ('*' *(splitted_email.first.size-2))
splitted_email.join

=> em***@domain.com

```