This can be simplified like so:
```ruby
name ||= Rex::Text.rand_text_alpha(7)
```