AgileVentures/LocalSupport

View on GitHub
app/models/address.rb

Summary

Maintainability
A
0 mins
Test Coverage

Method has too many lines. [10/7] (https://github.com/bbatsov/ruby-style-guide#short-methods)
Open

  def parse
    address = value.to_s
    postcode = ''
    match = value.to_s.match(/(.*)(,\s*(\w\w\d\s* \d\w\w))/)
    if match
Severity: Minor
Found in app/models/address.rb by rubocop

This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

Don't extend an instance initialized by Struct.new. (https://github.com/bbatsov/ruby-style-guide#no-extend-struct-new)
Open

class Address < Struct.new(:value)
Severity: Minor
Found in app/models/address.rb by rubocop

This cop checks for inheritance from Struct.new.

Example:

# bad
class Person < Struct.new(:first_name, :last_name)
end

# good
Person = Struct.new(:first_name, :last_name)

There are no issues that match your filters.

Category
Status