Code-climate duplicate code fixes (#382)
* Code-climate duplicate code fixes * Spec for accounts controller
This commit is contained in:
parent
97ab82892d
commit
f98cd83a29
5 changed files with 48 additions and 24 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue