File domain.rb
has 407 lines of code (exceeds 250 allowed). Consider refactoring. Open
module Expressly
class CustomerImport
attr_accessor :metadata, :primary_email, :customer, :cart
def initialize(attribute_value_map = {})
attribute_value_map.map { |(k, v)| public_send("#{k}=", v) }
Method Expressly::Phone#type=
is defined at both lib/expressly/domain.rb:216 and lib/expressly/domain.rb:222. Open
def type=(type)
- Read upRead up
- Exclude checks
This cop checks for duplicated instance (or singleton) method definitions.
Example:
# bad
def duplicated
1
end
def duplicated
2
end
Example:
# bad
def duplicated
1
end
alias duplicated other_duplicated
Example:
# good
def duplicated
1
end
def other_duplicated
2
end
Method Expressly::Phone#country_code=
is defined at both lib/expressly/domain.rb:216 and lib/expressly/domain.rb:227. Open
def country_code=(country_code)
- Read upRead up
- Exclude checks
This cop checks for duplicated instance (or singleton) method definitions.
Example:
# bad
def duplicated
1
end
def duplicated
2
end
Example:
# bad
def duplicated
1
end
alias duplicated other_duplicated
Example:
# good
def duplicated
1
end
def other_duplicated
2
end
Put one space between the method name and the first argument. Open
attr_accessor :email, :alias
- Read upRead up
- Exclude checks
Checks that exactly one space is used between a method name and the first argument for method calls without parentheses.
Alternatively, extra spaces can be added to align the argument with something on a preceding or following line, if the AllowForAlignment config parameter is true.
Example:
# bad
something x
something y, z
something'hello'
# good
something x
something y, z
something 'hello'
Method Expressly::CustomerOrder#order_date=
is defined at both lib/expressly/domain.rb:458 and lib/expressly/domain.rb:463. Open
def order_date=(order_date)
- Read upRead up
- Exclude checks
This cop checks for duplicated instance (or singleton) method definitions.
Example:
# bad
def duplicated
1
end
def duplicated
2
end
Example:
# bad
def duplicated
1
end
alias duplicated other_duplicated
Example:
# good
def duplicated
1
end
def other_duplicated
2
end
Method Expressly::Address#phone_index=
is defined at both lib/expressly/domain.rb:153 and lib/expressly/domain.rb:160. Open
def phone_index=(phone_index)
- Read upRead up
- Exclude checks
This cop checks for duplicated instance (or singleton) method definitions.
Example:
# bad
def duplicated
1
end
def duplicated
2
end
Example:
# bad
def duplicated
1
end
alias duplicated other_duplicated
Example:
# good
def duplicated
1
end
def other_duplicated
2
end
Method Expressly::Customer#gender=
is defined at both lib/expressly/domain.rb:66 and lib/expressly/domain.rb:75. Open
def gender=(gender)
- Read upRead up
- Exclude checks
This cop checks for duplicated instance (or singleton) method definitions.
Example:
# bad
def duplicated
1
end
def duplicated
2
end
Example:
# bad
def duplicated
1
end
alias duplicated other_duplicated
Example:
# good
def duplicated
1
end
def other_duplicated
2
end
Put one space between the method name and the first argument. Open
attr_accessor :type, :number, :country_code
- Read upRead up
- Exclude checks
Checks that exactly one space is used between a method name and the first argument for method calls without parentheses.
Alternatively, extra spaces can be added to align the argument with something on a preceding or following line, if the AllowForAlignment config parameter is true.
Example:
# bad
something x
something y, z
something'hello'
# good
something x
something y, z
something 'hello'
Method Expressly::Customer#date_of_birth=
is defined at both lib/expressly/domain.rb:66 and lib/expressly/domain.rb:80. Open
def date_of_birth=(date_of_birth)
- Read upRead up
- Exclude checks
This cop checks for duplicated instance (or singleton) method definitions.
Example:
# bad
def duplicated
1
end
def duplicated
2
end
Example:
# bad
def duplicated
1
end
alias duplicated other_duplicated
Example:
# good
def duplicated
1
end
def other_duplicated
2
end
Method Expressly::Customer#last_updated=
is defined at both lib/expressly/domain.rb:66 and lib/expressly/domain.rb:85. Open
def last_updated=(last_updated)
- Read upRead up
- Exclude checks
This cop checks for duplicated instance (or singleton) method definitions.
Example:
# bad
def duplicated
1
end
def duplicated
2
end
Example:
# bad
def duplicated
1
end
alias duplicated other_duplicated
Example:
# good
def duplicated
1
end
def other_duplicated
2
end
Method Expressly::Customer#last_order_date=
is defined at both lib/expressly/domain.rb:66 and lib/expressly/domain.rb:90. Open
def last_order_date=(last_order_date)
- Read upRead up
- Exclude checks
This cop checks for duplicated instance (or singleton) method definitions.
Example:
# bad
def duplicated
1
end
def duplicated
2
end
Example:
# bad
def duplicated
1
end
alias duplicated other_duplicated
Example:
# good
def duplicated
1
end
def other_duplicated
2
end
Put one space between the method name and the first argument. Open
attr_accessor :type, :identity
- Read upRead up
- Exclude checks
Checks that exactly one space is used between a method name and the first argument for method calls without parentheses.
Alternatively, extra spaces can be added to align the argument with something on a preceding or following line, if the AllowForAlignment config parameter is true.
Example:
# bad
something x
something y, z
something'hello'
# good
something x
something y, z
something 'hello'
Method Expressly::OnlineIdentity#type=
is defined at both lib/expressly/domain.rb:310 and lib/expressly/domain.rb:316. Open
def type=(type)
- Read upRead up
- Exclude checks
This cop checks for duplicated instance (or singleton) method definitions.
Example:
# bad
def duplicated
1
end
def duplicated
2
end
Example:
# bad
def duplicated
1
end
alias duplicated other_duplicated
Example:
# good
def duplicated
1
end
def other_duplicated
2
end