Updated generator code and spec
Rubocop syntax changes