Code-climate duplicate code fixes (#382)

* Code-climate duplicate code fixes

* Spec for accounts controller
This commit is contained in:
Sojan Jose 2019-12-24 17:32:27 +05:30 committed by Pranav Raj S
parent 97ab82892d
commit f98cd83a29
5 changed files with 48 additions and 24 deletions

View file

@ -2,11 +2,7 @@
class AccountBuilder
include CustomExceptions::Account
def initialize(params)
@account_name = params[:account_name]
@email = params[:email]
end
pattr_initialize [:account_name!, :email!]
def perform
validate_email