joel/enum_for

View on GitHub

Showing 1 of 1 total issue

Method enum_for has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  def enum_for(hash)
    enum_name = hash.keys.first.to_s
    mapping   = hash.values.first.with_indifferent_access

    define_singleton_method(enum_name.pluralize) do
Severity: Minor
Found in lib/enum_for.rb - About 1 hr to fix
    Severity
    Category
    Status
    Source
    Language