MakeYourLaws/MakeYourLaws

View on GitHub
app/models/fec/committee_interest_group_category.rb

Summary

Maintainability
A
0 mins
Test Coverage
class Fec::CommitteeInterestGroupCategory
  TYPES = {
    'C' => 'Corporation',
    'L' => 'Labor organization',
    'M' => 'Membership organization',
    'T' => 'Trade association',
    'V' => 'Cooperative',
    'W' => 'Corporation without capital stock',
    'O' => 'Other', # undocumented
  }
  def method_missing type
    TYPES[type] || TYPE.rassoc(type)[0]
  end
end