Updated

app/builders / product_builder.rb

A
16 lines of codes
3 methods
2.2 complexity/method
8 churn
6.74 complexity
0 duplications
class ProductBuilder
  1. ProductBuilder assumes too much for instance variable '@product'
  2. ProductBuilder has no descriptive comment
def initialize(user, params) @params = params @user = user end def build @product = @user.account.products.new(@params) @product end def perform build @product end end