joel/enum_for

View on GitHub
lib/enum_for.rb

Summary

Maintainability
A
1 hr
Test Coverage

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

    There are no issues that match your filters.

    Category
    Status